Created
July 26, 2018 08:33
-
-
Save oksuz/c68a47f00262887f2b281c44707d30e0 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Searchs $FILE's $TEXT changes in all branches | |
# Author: Yunus Oksuz <[email protected]> | |
# track all remote branches | |
git branch -a | grep -v HEAD | perl -ne 'chomp($_); s|^\*?\s*||; if (m|(.+)/(.+)| && not $d{$2}) {print qq(git branch --track $2 $1/$2\n)} else {$d{$_}=1}' | csh -xfs | |
TEXT="1\\.8\\.76" | |
FILE="build.gradle" | |
for i in `git branch | grep -v master`; | |
do | |
git checkout ${i} | |
git --no-pager log --follow -p $FILE | grep $TEXT | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment