What command can I use to print out the commit id of HEAD?
This is what I\'m doing by hand:
$ cat .git/HEAD ref: refs/heads/v3.3 $ cat .git/refs/head
Play with Bash:
git show HEAD | sed -n 1p | cut -d " " -f 2
git log -1
for only commit id
git log | head -n 1
Use the command:
git rev-parse HEAD
For the short version:
git rev-parse --short HEAD