Skip to main content
Engineer's Log

Git cheatsheet

Version tracking shortcuts.

git log -1 --format='%H'
Get the last commit's SHA, in long or short form
git log -1 --format='%h'
Get the last commit's SHA, in short form
git push --follow-tags
Push default refs, as well as annotated tags in refs/tags

Back to Cheatsheets