Created
April 22, 2010 08:34
-
-
Save scottwb/374977 to your computer and use it in GitHub Desktop.
Get the SHA of some git branch.
This file contains 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
# Get the SHA of some branch. There must be a better way to do this. | |
git log -1 --pretty=oneline origin/somebranch | sed -E "s/^([^[:space:]]+).*/\1/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This just in: Someone posted a comment on my blog about this with an even better way: