Skip to content

Instantly share code, notes, and snippets.

@tjake
Created November 2, 2011 13:23
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tjake/1333611 to your computer and use it in GitHub Desktop.
Save tjake/1333611 to your computer and use it in GitHub Desktop.
search all branches for a file
for branch in `git for-each-ref --format="%(refname)" refs/heads`
do
echo $branch ; echo `git ls-tree -r --name-only $branch | grep -i $1`
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment