Created
July 23, 2012 07:48
-
-
Save danielestevez/3162459 to your computer and use it in GitHub Desktop.
Create brnaches and push to remote for all GIT submodules
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
function newbranch() { | |
git submodule foreach git checkout ${1} | |
git submodule foreach git pull origin ${1} | |
git submodule foreach git co -b ${2} | |
git submodule foreach git push origin ${2} | |
git status | |
} | |
# newbranch master newbranchname |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment