Skip to content

Instantly share code, notes, and snippets.

@maxsum-corin
Created June 21, 2011 14:04
Show Gist options
  • Save maxsum-corin/1037925 to your computer and use it in GitHub Desktop.
Save maxsum-corin/1037925 to your computer and use it in GitHub Desktop.
Recipes for working with git submodules
#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