Created
June 21, 2011 14:04
-
-
Save maxsum-corin/1037925 to your computer and use it in GitHub Desktop.
Recipes for working with 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
#http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/ | |
# Adding a git submodule | |
git submodule add $url $path | |
git submodule init | |
git submodule update | |
# Removing a git submodule | |
vi .gitmodules | |
vi .git/config | |
git rm --cached $path | |
rm -r $path | |
# Updating a git submodule | |
git submodule init | |
git submodule update | |
pushd . | |
cd $path | |
git checkout master | |
git pull | |
popd | |
git add $path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment