Skip to content

Get short revision hash

If you want to refer to a commit, you don’t need to know that full hash id. The short version is fairly sufficient in most cases. You can get the the short hash of your current HEAD with the following command:

You can also replace HEAD with the full hash of a commit to get the short hash of that one.

[sc name=”src” url=”https://stackoverflow.com/questions/5694389/get-the-short-git-version-hash” ]

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.