Created
January 4, 2018 10:57
-
-
Save lastab/5988699cd3514bb4d9979d0a84836dc6 to your computer and use it in GitHub Desktop.
git search file_name by branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for branch in `git for-each-ref --format="%(refname)" refs/heads`; do | |
echo $branch :; git ls-tree -r --name-only $branch | grep '<foo>' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment