0 votes
1 view
in Devops and Agile by (25.5k 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 (42.6k 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.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !