git:git-submodules
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
git:git-submodules [2024/11/30 19:13] – admin | git:git-submodules [2024/12/12 08:44] (current) – admin | ||
---|---|---|---|
Line 56: | Line 56: | ||
</ | </ | ||
- | ==== Working with single | + | ==== Working with a particular |
- | If after cloning the main git repo the submodule contains nothing, it can be cloned. | + | If the main git repo contains many submodules, it can be interesting to work only on one particular submodule. |
+ | For example, if after cloning the main git repo the submodule contains nothing, it can be cloned | ||
Suppose the path to submodule (from main repo path) is / | Suppose the path to submodule (from main repo path) is / | ||
<code bash> | <code bash> | ||
Line 66: | Line 67: | ||
If the submodule is not in the correct branch, these commands can be used to list the branches and set to the correct one (ex master) | If the submodule is not in the correct branch, these commands can be used to list the branches and set to the correct one (ex master) | ||
<code bash> | <code bash> | ||
- | git -C studwork | + | git -C / |
- | git -C studwork | + | git -C / |
</ | </ | ||
In general a git **command** on submodule can be acheived from main git repo by : | In general a git **command** on submodule can be acheived from main git repo by : | ||
<code bash> | <code bash> | ||
- | git -C studwork | + | git -C / |
</ | </ | ||
git/git-submodules.1732990422.txt.gz · Last modified: 2024/11/30 19:13 by admin