Created
October 16, 2012 20:40
-
-
Save sunils34/3901847 to your computer and use it in GitHub Desktop.
Get the first commit hash of a Git repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
commit=`git log | grep commit | head -1 | cut -d ' ' -f2` | |
echo $commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment