6

I want to find commit 2a89985 in this Project in Github. I want to find out how to access a commit If I know the commit number? Since it is a big project there seems to be a lot of commits. Is it possible to access it from terminal?

2 Answers 2

1

If you want web access to the commit without checking it out (like eedvinas.me suggested), you can access it directly by the url https://github.com/<user>/<project>/commit/<full commit hash>, e.g.: https://github.com/Schischu/ptxdist_sh/commit/43135d7f4575a415dc7811bad540b3f0439a303f.

However, the commit you're referencing, 2a89985, does not exist in this project:

[amureini@amureini ptxdist_sh (master)]$ git show 2a89985
fatal: ambiguous argument '2a89985': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
[amureini@amureini ptxdist_sh (master)]$ 
1
  • sorry ya actually the link was wrong but with right link your method did work. I tried out git show 2a89985 and it worked even git log -p 2a89985 also worked.
    – Stormvirux
    Mar 23, 2014 at 11:46
2

You can checkout a specific commit:

git checkout 2a89985

This will put you in a detached head state though.

If you want to have a new branch on specific commit, then you can do it like this:

git branch branchname <sha1-of-commit>

In your case:

git branch newbranch 2a89985
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .