Last active
August 23, 2016 19:34
-
-
Save pablo-sg-pacheco/0277e8b584f7d05405d569af4f09dced to your computer and use it in GitHub Desktop.
GIT - submodules
This file contains hidden or 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
#COMMIT AND PUSH ALL SUBMODULES | |
#In Main project | |
git submodule foreach 'git add .' #recursively add files in submodules | |
git submodule foreach 'git commit -a -m "Altered submodule" || :' | |
git add --all :/ | |
git commit -am "Altered submodule" | |
git push --recurse-submodules=on-demand |
This file contains hidden or 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
#UPDATES ALL SUBMODULES | |
#In Main project | |
#If its the first time: | |
git submodule update --init --recursive | |
#If not | |
git submodule foreach git pull origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment