Quantcast
Channel: Programming Archives - SysTutorials
Viewing all articles
Browse latest Browse all 130

Git Submodule Cheat Sheet

$
0
0
I summarize some commonly used commands that I find useful for working with git submodule. For the list of full commands, check the git submodule manual. Git.png In the following commands, I take scala-mode2 as an example as the submodule. Add a submodule git submodule init git submodule status git submodule add -f git@example.com/the-repo ./the-repo Get submodules During clone git clone --recursive git@example.org:repo In a cloned repository git submodule update --init --recursive Check out the master and update submodules git submodule foreach --recursive git checkout master git submodule foreach --recursive git pull Push the version changes to origin # cd the git repository first (not in submodule) git commit -am 'submodule updated' git push Delete a submodule git submodule deinit ./the-repo git rm ./the-repo » Read more

Viewing all articles
Browse latest Browse all 130

Trending Articles