Add git notes
This commit is contained in:
41
git/git-submodules.txt
Executable file
41
git/git-submodules.txt
Executable file
@@ -0,0 +1,41 @@
|
||||
add submodule:
|
||||
git submodule add [url]
|
||||
|
||||
|
||||
config:
|
||||
diff:
|
||||
git config --global diff.submodule log
|
||||
(git diff --submodule)
|
||||
status:
|
||||
git config status.submodulesummary 1
|
||||
submodule commands:
|
||||
git config submodule.recurse true
|
||||
|
||||
|
||||
cloning:
|
||||
git clone [url]
|
||||
git submodule init
|
||||
git submodule update / git submodule update --init
|
||||
or
|
||||
git clone --recurse-submodules [url]
|
||||
|
||||
|
||||
change branch:
|
||||
git config -f .gitmodules submodule.[name].branch [branch]
|
||||
|
||||
|
||||
fetch updates for submodules
|
||||
git submodule update --remote [name] (first update)
|
||||
git submodule update --init --recursive (update all)
|
||||
git submodule update --remote --merge (fetch and merge)
|
||||
git pull --recurse-submodules
|
||||
in case url changed:
|
||||
git submodule sync --recursive
|
||||
|
||||
|
||||
upload updates for submodules:
|
||||
git push --recurse-submodules=(check/on-demand)
|
||||
|
||||
|
||||
other:
|
||||
git submodule foreach '[command]'
|
||||
Reference in New Issue
Block a user