Skip to content

Instantly share code, notes, and snippets.

@mirrec
Created September 13, 2013 14:47
Show Gist options
  • Save mirrec/6551698 to your computer and use it in GitHub Desktop.
Save mirrec/6551698 to your computer and use it in GitHub Desktop.
find hash of commit cat contains given FILE_NAME in bash
git rev-list --all | while read HASH; do echo $HASH; git show --pretty="format:" --name-only $HASH | grep FILE_NAME; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment