git
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| git [2016/06/08 15:27] – [Script for Backup] k2patel | git [2020/08/10 02:35] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 119: | Line 119: | ||
| git pull | git pull | ||
| </ | </ | ||
| + | |||
| + | ===== Git Submodule ===== | ||
| + | |||
| + | ==== Clone Repository including submodule ==== | ||
| + | |||
| + | <code bash> | ||
| + | git clone --recursive git@github.com: | ||
| + | </ | ||
| + | |||
| + | ==== clone submodule from existing project ==== | ||
| + | |||
| + | <code bash> | ||
| + | git submodule update --init --recursive | ||
| + | </ | ||
| + | |||
| + | ==== To initialize single submodule ==== | ||
| + | <code bash> | ||
| + | git submodule update --init modules/ | ||
| + | </ | ||
| + | |||
| + | ==== Pull changes from all submodule ==== | ||
| + | <code bash> | ||
| + | git submodule foreach git pull origin master | ||
| + | </ | ||
| + | |||
| + | ==== Usefull when submodule HEAD and status HEAD messed up ==== | ||
| + | <code bash> | ||
| + | git submodule update --init | ||
| + | </ | ||
| + | |||
| + | |||
git.1465399633.txt.gz · Last modified: 2020/08/10 02:30 (external edit)
