Skip to content

Instantly share code, notes, and snippets.

@macoj
Last active December 20, 2017 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save macoj/cde265f0ab748ce7b9e5ce9a48325fe1 to your computer and use it in GitHub Desktop.
Save macoj/cde265f0ab748ce7b9e5ce9a48325fe1 to your computer and use it in GitHub Desktop.
Updating submodule in git
# add a submodule in a repository:
git submodule add https://github.com/<user>/submodule_name
# update the submodule
cd submodule_name
git checkout master
git pull
cd ..
git add submodule_name
git commit -m "Updating submodule to latest"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment