Updated Submodule modes (org)
[git-submod-enhancements.wiki.git] / Submodule-modes.org
1 Depending on the [[Submodule use cases][Submodule use case]] a different mode of operation should be chosen for a submodule. This table describes different modes (/italics/ denote functionality that isn't implementeed in core git yet).
2
3 | Submodule mode | exact | branch | floating |
4 | Description | The SHA-1 recorded for the superproject is checked out as a detached HEAD | A local branch is used to integrate both local and upstream changes, still a SHA-1 is recorded to denote the exact submodule commit used | A local branch follows a remote branch, the SHA-1 only serves as an initial starting point and may be updated to record releases or other special occasions, but doesn't have to |
5 | Typical use case | Content shared between different repos | Content shared between different repos | Content managed by somebody else |
6 | Configuration | <none> | =submodule.<name>.update=: set to =merge= or =rebase= depending on the desired update method | =submodule.<name>.branch=: set to the upstream branch |