Skip to content

Instantly share code, notes, and snippets.

@pmakholm
Created May 2, 2012 08:55
Show Gist options
  • Save pmakholm/2575267 to your computer and use it in GitHub Desktop.
Save pmakholm/2575267 to your computer and use it in GitHub Desktop.
Finding files in git
#!/bin/sh
for commit in $( git log --format=format:%H ) ; do
git ls-tree -r $commit | while read line ; do
echo $commit $line
done
done | grep $( git hash-object $1 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment