User Tools

Site Tools


tips:linux:gitsubmodule

Git Submodules: Adding, Using, Removing, Updating

To add a submodule in the current directory:

git submodule add https://github.com/example

To get the status of submodules:

git submodule status

To update submodules:

git submodule update

To remove a submodule:

git submodule deinit -f example
git rm --cached path/to/example
rm -rf .git/modules/path/to/example

More info here and here.

tips/linux/gitsubmodule.txt · Last modified: 2015/11/06 10:01 by erik