Skip to content

Instantly share code, notes, and snippets.

@thelebster
Forked from andrezrv/submodules.sh
Created August 16, 2022 10:51
Show Gist options
  • Save thelebster/8e360f237dd0516d63863126bb190183 to your computer and use it in GitHub Desktop.
Save thelebster/8e360f237dd0516d63863126bb190183 to your computer and use it in GitHub Desktop.
Using Git submodules.
# CREATE: On the root folder of a Git repository:
$ git submodule add [email protected]:nicethemes/<repo>.git location/of/submodule
# Cloning a repo that contains submodules:
$ git clone --recursive [email protected]:nicethemes/<repo>.git location/of/repo
# Or:
$ git clone [email protected]:nicethemes/<repo>.git location/of/repo
$ git submodule init
$ git submodule update
# Deleting a submodule:
$ git submodule deinit location/of/submodule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment