Skip to content

Instantly share code, notes, and snippets.

@brandon-beacher
Created September 1, 2011 10:47
Show Gist options
  • Save brandon-beacher/1185925 to your computer and use it in GitHub Desktop.
Save brandon-beacher/1185925 to your computer and use it in GitHub Desktop.
git question
i want to show the current revision of a file
and the previous revision of a file
git show HEAD~6:db/catalog_items/karastan_carpets.tsv
git show HEAD~7:db/catalog_items/karastan_carpets.tsv
at the moment these two commands give me what I want
but as commits are made the 6 and 7 will change
what is the git treeish syntax for "current revision" and "previous revision"?
does such a thing even exist?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment