Last active
January 2, 2016 02:29
-
-
Save sangeeths/8237082 to your computer and use it in GitHub Desktop.
Git commands to create and update submodules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Creating a submodule: | |
git clone <parent-repo-url> | |
cd path/to/parent/repo | |
git submodule add <repo-url> path/to/submodule | |
Initializing a submodule: | |
git submodule init | |
git submodule update | |
Updating a submodule: | |
cd path/to/submodule | |
git checkout master | |
[add, edit, delete files..] | |
git add . | |
git commit -m "updating submodule" | |
git push | |
Updating the parent repo: | |
cd path/to/parent/repo | |
git add . | |
git commit -m "updated submodule" | |
git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment