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 ...@@ -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) - [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. - 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) - [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) - [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. - 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) - [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 ...@@ -79,19 +79,21 @@ There are two ways to get codes to Euler: (1) copy from your local and (2) use g
- Use git - 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). 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., (1) On Euler, go to the folder where you put the Nexus-e codes. e.g.,
```cd nexus-e``` ```cd nexus-e```
(2) Update all submodules (2) Update the codes
- Delete your local changes - Delete your local changes (e.g., your edits in "run_Nexuse.m")
```git submodule foreach "git reset --hard"``` ```git reset --hard```
- Switch to the master branchs in all submodules - Pull changes from the overarching repository
```git submodule foreach "git checkout master"``` ```git pull```
- Pull the latest updates in the master branchs - Update the submodules
```git submodule foreach "git pull"``` ```git submodule update```
- (Optional) Check the commit numbers of each submodule
- 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". ```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., (1) Go to the folder where you want to pull the changes, e.g.,
```cd Shared``` ```cd Shared```
......
Supports Markdown
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