Skip to content

Instantly share code, notes, and snippets.

@thomaslaurenson
Created June 19, 2018 19:58
Show Gist options
  • Save thomaslaurenson/9d445dca61c1a8bc6b22cbf708758d57 to your computer and use it in GitHub Desktop.
Save thomaslaurenson/9d445dca61c1a8bc6b22cbf708758d57 to your computer and use it in GitHub Desktop.
# Make sure you are in the repo directory
cd <somewhere>
# Add the external repository as a submodule
git submodule add <address_of_submodule_repo>
# Make sure to initialize it and update (when required)
git submodule init
git submodule update
# Check status, add everything (if needed), then commit
git status
git add .
git commit -m "Added <submodule/library> as a git submodule."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment