Skip to content

Instantly share code, notes, and snippets.

@capoferro
Created October 13, 2014 23:43
Show Gist options
  • Save capoferro/a3ad37c75af356f4b8c6 to your computer and use it in GitHub Desktop.
Save capoferro/a3ad37c75af356f4b8c6 to your computer and use it in GitHub Desktop.
gomaster () {
odir=$(pwd)
echo The following are not on the master branch:
for i in `find $GOPATH -name .git`
do
if [[ $(cd $i && git branch | grep master) == '* master' ]]
then
echo $i | sed 's/\/.git//' | sed 's/.*src\///'
fi
done
cd $odir
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment