Skip to content

Instantly share code, notes, and snippets.

@sahilseth
Created December 1, 2015 06:41
Show Gist options
  • Save sahilseth/68d8116536702205fe2c to your computer and use it in GitHub Desktop.
Save sahilseth/68d8116536702205fe2c to your computer and use it in GitHub Desktop.
git submodules
# here is scratchpad on various steps which are helpful in using git submodules
# holy grail of details: https://git-scm.com/book/en/v2/Git-Tools-Submodules
# adding a submodule
git submodule add <URL>
# clone a repo with submodules
git clone --recursive <URL>
# commit a change in a sub module:
cd submod
git commit -m "msg"
git push origin HEAD:master
# update submodule
git submodule update --remote DbConnector
# now we want to let your main repo also know that we have made the change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment