To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit ad3942dc authored by Xuqian Yan's avatar Xuqian Yan
Browse files

Updated git commands for repo instructions

parent 3fee15a3
......@@ -6,7 +6,7 @@ This document is only used to demonstrate git operations for certain nexus-e-rel
- [How do I get the repository?](#how-do-i-get-the-repository)
- Short answer: you "git clone" it from <https://gitlab.ethz.ch/nexus-e/nexus-e-framework.git> to a local folder.
- [What is the structure of the repository?](#what-is-the-structure-of-the-repository)
- Short answer: it is an overarching reposity called "nexus-e" containing sub-repositories ("[submodules](https://www.git-scm.com/book/en/v2/Git-Tools-Submodules)" is the official term in git).
- Short answer: it is an overarching repository called "nexus-e" containing sub-repositories ("[submodules](https://www.git-scm.com/book/en/v2/Git-Tools-Submodules)" is the official term in git).
- [I want to make changes in my own module. What should I do first?](#i-want-to-make-changes-in-my-own-module-what-should-i-do-first)
- Short answer: be aware of where you are in other modules. If needed, pull changes from other submodules.
- [I have made some changes in my own module and tested them in a small scale. How do I test them with the full Nexus-e platform?](#i-have-made-some-changes-in-my-own-module-and-tested-them-in-a-small-scale-how-do-i-test-them-with-the-full-nexus-e-platform)
......@@ -79,19 +79,21 @@ There are two ways to get codes to Euler: (1) copy from your local and (2) use g
- Use git
In this section, we assume that you already have Nexus-e codes on Euler, so you only need to update the codes where you have made changes. If this is not the case, follow the section [Euler setup](setup.html#euler-setup).
- First, make sure to have a clean start - all submodules should be on the most updated "master" branch.
- First, make sure to have a clean start - be aligned with the most updated commit in the overarching repository.
(1) On Euler, go to the folder where you put the Nexus-e codes. e.g.,
```cd nexus-e```
(2) Update all submodules
- Delete your local changes
```git submodule foreach "git reset --hard"```
- Switch to the master branchs in all submodules
```git submodule foreach "git checkout master"```
- Pull the latest updates in the master branchs
```git submodule foreach "git pull"```
- Then, go to the individual submodules where you want to pull changes that are not in the "master" branch. For example, you want to test your changes in the "Shared" submodule which is pushed to a branch named as "postprocess".
(2) Update the codes
- Delete your local changes (e.g., your edits in "run_Nexuse.m")
```git reset --hard```
- Pull changes from the overarching repository
```git pull```
- Update the submodules
```git submodule update```
- (Optional) Check the commit numbers of each submodule
```git submodule foreach "git rev-parse HEAD"```
- Then, go to the individual submodules where you want to pull changes that are not in the overarching repository. For example, you want to test your changes in the "Shared" submodule which is pushed to a branch named as "postprocess".
(1) Go to the folder where you want to pull the changes, e.g.,
```cd Shared```
......
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