The TS-GitLab will have to shut down towards the end of the year — please think about migrating your projects to GitLab.com or GitHub.
(This is still a very early message, meant to keep you informed. There will be more urgent ones in the future.)

Commit cd9e70e7 authored by Lukas Riedel's avatar Lukas Riedel
Browse files

Add README.md for submodules

This is basically copied from Utopia
parent e0c1b445
# Developers' short introduction to Git Submodules
Submodules work like every other Git repository, but are tracked in their
'superproject'. The superproject stores information on its submodules in the
`.gitmodules` file in the top-level directory and simply records a commit SHA
for any submodule.
### Updating a submodule locally
If you updated the code base of your 'superproject' by calling `git pull`
or `git checkout <branch>`, the submodule commit SHA might have changed. Git
_will not_ automatically update the submodule, but you have to do so manually
by calling
git submodule update
### Upgrading the submodule
If you wish to use a new commit/branch/tag of a submodule, you can enter it and
use the regular Git commands. If you return to your superproject, it will notice
your changes. Use
git diff [--cached] --submodule
to see a list of commits that update the submodule. To always enable this view
when calling `git diff`, update your machine's global git config via
git config --global diff.submodule log
You can add the changes in the submodule via the usual Git workflow by calling
git add <path/to/submodule>
and commit them afterwards. Other users pulling your commit will then need to
call `git submodule update` to receive the changes.
### Submodules tracking a branch
Submodules always resemble a repository in "detached HEAD" state. Even when
tracking a certain _branch_, submodules will always point at a certain _commit_.
If you which to pull updates from upstream, enter the submodule and call
`git pull`. _Notice that this change has to be committed in the superproject!_
## Current submodule setup
Submodules checking out tags instead of branches to not need regular remote
updates. See the list below for the current setup.
| Software | Checkout | Branch? |
| -------- | -------- | ------- |
| spdlog | `v1.1.0` | No |
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment