Created
October 6, 2016 17:02
-
-
Save Shengliang/559ed82653884f1e2b068b1ecc70d2ed to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# ref: https://git-scm.com/book/en/v2/Git-Tools-Submodules | |
# export GITCLONEOPTIONS="--depth 1" | |
# git clone url | |
# git clone --recursive url | |
# git config --global diff.submodule log | |
# Pulling in Upstream Changes | |
# git fetch | |
# git merge origin/master | |
# git checkout -b v10062016 remotes/origin/bringup | |
# git branch -vv | |
# git submodule init | |
# git submodule update | |
# git submodule update --remote [submodule_name] | |
# git submodule foreach 'git rup' | |
# git submodule foreach 'git branch' | |
# git submodule foreach 'git checkout -b v10062016 remotes/origin/bringup' | |
# git submodule update --remote | |
# git config --global status.submodulesummary 1 | |
# git log -p --submodule | |
# git submodule update --remote | |
# git submodule update --remote --merge | |
# git submodule update --remote --rebase | |
# git diff --cached DbConnector | |
# git diff --cached --submodule | |
# git commit -am 'added DbConnector module' | |
# git push --recurse-submodules=check | |
# git push --recurse-submodules=on-demand | |
# git submodule foreach 'git stash' | |
# git submodule foreach 'git checkout -b bringup remotes/origin/bringup' | |
# git diff; git submodule foreach 'git diff' | |
Alias | |
$ git config --global alias.sdiff '!'"git diff && git submodule foreach 'git diff'" | |
$ git config --global alias.spush 'push --recurse-submodules=on-demand' | |
$ git config --global alias.supdate 'submodule update --remote --merge' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment