... | ... | @@ -9,7 +9,7 @@ In the following, a few hints how to get started with submodules and how to perf |
|
|
|
|
|
Getting started
|
|
|
----------------
|
|
|
* Start a Project on OpenVT, let's say the name is **my_awesome_project.** You would like to include some other repository in there, let's say that one is called **the_other_awesome_project** (that one can be located on OpenVT or any other git server).
|
|
|
* Start a Project on OpenVT, let's say the name is **my_awesome_project** (that one will be called 'main repository' in the following). You would like to include some other repository in there, let's say that one is called **the_other_awesome_project** (that one can be located on OpenVT or any other git server; we will refer to it as the 'submodule repository').
|
|
|
* Make a clone on your computer with git:
|
|
|
```bash
|
|
|
git clone <cloning_link_for_my_awesome_project>
|
... | ... | @@ -28,15 +28,17 @@ git submodule update |
|
|
|
|
|
Updating the submodule(s) to latest commit
|
|
|
---------------------------------------
|
|
|
*By default, a submodule always points to a certain commit of the submodule repository. This does not change if you pull the main repository. In order to update also the submodulesto the latest commit, you can either just successively browse to each the submodule folder and pull the branch of your choice (in many cases, that will be 'origin master'):
|
|
|
* By default, a submodule always points to a certain commit of the submodule repository. This does not change if you pull the main repository. In order to update also the submodulesto the latest commit, you can either just successively browse to each the submodule folder and pull the branch of your choice (in many cases, that will be 'origin master'):
|
|
|
```bash
|
|
|
git pull <remote branch name>
|
|
|
```
|
|
|
*Or, you can browse to the main repository and simultaneously pull all submodules:
|
|
|
* Or, you can browse to the main repository and simultaneously pull all submodules:
|
|
|
```bash
|
|
|
git pull --recurse-submodules
|
|
|
git submodule update --remote
|
|
|
```
|
|
|
|
|
|
|
|
|
Changes in submodules
|
|
|
----------------------
|
|
|
If you have done changes to the content of a submodule, they are not automatically pushed by pushing the main repository
|
|
|
|