Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (29.3k points)

I need to find a commit in Git by a given hash, SHA. For example, if I have the "a2c25061" hash, and I need to get the author and the committer of this commit. What is the command to get that?

1 Answer

0 votes
by (50.2k points)

To find a commit using Sha can be achieved by using git show command:


git show <sha-id>

For your case, it will be 

git show a2c25061

To get only about the commit, not about the diff you can use --stat option as well.

Related questions

Browse Categories