Skip to content

Instantly share code, notes, and snippets.

@pedrouid
Created September 24, 2018 00:11
Show Gist options
  • Select an option

  • Save pedrouid/ec8168dcab07e15b8d40f7cac0b39abd to your computer and use it in GitHub Desktop.

Select an option

Save pedrouid/ec8168dcab07e15b8d40f7cac0b39abd to your computer and use it in GitHub Desktop.
Git Submodules Cheatsheet

Add Submodule

git submodule add git@mygithost:project lib/project

Update Submodule

cd lib/project && git pull && cd ../.. && git commit -a -m 'update submodule'

Delete Submodule

git submodule deinit <path_to_submodule>
git rm <path_to_submodule>
git commit-m "Removed submodule "
rm -rf .git/modules/<path_to_submodule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment