Created
February 28, 2015 00:09
-
-
Save richmilns/1dcdfe2d55bee32d80cf to your computer and use it in GitHub Desktop.
Useful Git commands
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
# clone including submodules | |
git clone --recursive [email protected]:repo.git | |
# pull changes and update all submodules | |
git pull && git submodule foreach git pull origin master && git submodule update --recursive | |
# pull changes for every submodule | |
git submodule foreach git pull origin master | |
# when adding a new submodule after repo has been cloned, you need to re-init all submodules to make sure the code is actually checkout out | |
git submodule update --init --recursive | |
# update tags | |
git fetch --tags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment