... | @@ -29,13 +29,13 @@ $ git clone --recurse-submodules git@gitlab.psi.ch:OPAL/Libraries/ippl.git |
... | @@ -29,13 +29,13 @@ $ git clone --recurse-submodules git@gitlab.psi.ch:OPAL/Libraries/ippl.git |
|
### Working with a fork
|
|
### Working with a fork
|
|
For larger projects we recommend to fork the main repository. You can also fork a certain submodule only.
|
|
For larger projects we recommend to fork the main repository. You can also fork a certain submodule only.
|
|
|
|
|
|
To fork a submodule, you can do so via the GitLab interface. Then, replace the url of the submodule by the url of your fork in the file [.gitmodules] (https://gitlab.psi.ch/OPAL/Libraries/ippl/-/blob/master/.gitmodules). Once this is done:
|
|
To fork a submodule, you can do so via the GitLab interface. Then, in the file [.gitmodules] (found in the cloned ippl repository) replace the url of the submodule by the url of your fork. Once this is done, run the following commands:
|
|
```bash
|
|
```bash
|
|
$ git submodule init
|
|
$ git submodule init
|
|
$ git submodule update
|
|
$ git submodule update
|
|
```
|
|
```
|
|
|
|
|
|
You can add an upstream to be able to get all the latest changes from the master. If you are working with a fork of the main repository, for example, you can add the upstream by:
|
|
You can add an upstream to be able to get all the latest changes from the master. For example, if you are working with a fork of the main repository, you can add the upstream by:
|
|
```bash
|
|
```bash
|
|
$ git remote add upstream git@gitlab.psi.ch:OPAL/Libraries/ippl.git
|
|
$ git remote add upstream git@gitlab.psi.ch:OPAL/Libraries/ippl.git
|
|
```
|
|
```
|
... | @@ -43,7 +43,7 @@ You can then easily pull by typing |
... | @@ -43,7 +43,7 @@ You can then easily pull by typing |
|
```bash
|
|
```bash
|
|
$ git pull upstream/master
|
|
$ git pull upstream/master
|
|
````
|
|
````
|
|
This can also be done with forks of submodules, just go to the directory of the submodule in your cloned repository, and then repeat the commands above with the main repository address replaced by the submodule address. For example, for the Ippl-solvers submodule:
|
|
This can also be done with forks of submodules by going to the directory of the submodule in your cloned repository. Then run the commands above, with the main repository address replaced by the submodule address. For example, if working with a fork of the Ippl-solvers submodule, you would go to the [src/Solver] directory, then run:
|
|
```bash
|
|
```bash
|
|
$ git remote add upstream git@gitlab.psi.ch:OPAL/Libraries/ippl-solvers.git
|
|
$ git remote add upstream git@gitlab.psi.ch:OPAL/Libraries/ippl-solvers.git
|
|
```
|
|
```
|
... | | ... | |