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:

git rev-parse --short HEAD

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


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.