| ... | @@ -24,8 +24,7 @@ |
... | @@ -24,8 +24,7 @@ |
|
|
#### How does it works
|
|
#### How does it works
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
First, each user have to download reference svn repository with the good revision associated to the configurations. Then, user type **git clone** command to download legos repo and do synchronization ( **rsync** command) with reference repo.
|
|
|
First, each user has to download reference svn repository with the good revision associated to the configurations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|

|
| ... | @@ -35,7 +34,7 @@ First, each user has to download reference svn repository with the good revision |
... | @@ -35,7 +34,7 @@ First, each user has to download reference svn repository with the good revision |
|
|
========================
|
|
========================
|
|
|
#### Getting started
|
|
#### Getting started
|
|
|
|
|
|
|
|
page d accueil ==> https://git.outils-is.ird.fr/legos_atnum/repos
|
|
page d accueil ==> https://git.outils-is.ird.fr/legos_atnum/repos2
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|

|
| ... | @@ -43,7 +42,6 @@ page d accueil ==> https://git.outils-is.ird.fr/legos_atnum/repos |
... | @@ -43,7 +42,6 @@ page d accueil ==> https://git.outils-is.ird.fr/legos_atnum/repos |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###### Connexion ssh
|
|
###### Connexion ssh
|
|
|
First of all, to retrieve the repository make sure that your public keys have been copied and pasted into the box (see picture below)
|
|
First of all, to retrieve the repository make sure that your public keys have been copied and pasted into the box (see picture below)
|
|
|
If necessary, you will have to go to your local directory **~/.ssh/** and retrieve the *.pub file
|
|
If necessary, you will have to go to your local directory **~/.ssh/** and retrieve the *.pub file
|
| ... | @@ -64,15 +62,12 @@ git config --global http.https://git.outils-is.ird.fr.proxy http://proxy.legos.o |
... | @@ -64,15 +62,12 @@ git config --global http.https://git.outils-is.ird.fr.proxy http://proxy.legos.o |
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###### get repos from your PC (example)
|
|
###### get repos from your PC (example)
|
|
|
|
|
|
|
|
Cloning a repository is nothing more than initializing an empty repository at home locally (_git init_) and bringing a remote branch repository back to it (_git fetch_) and merge it on your master branch. We will work on these new sources on the branch by default (master). It is possible to create branches and work on them. At any time, you can know where you are and if any changes have been made with _git status_
|
|
Cloning a repository is nothing more than initializing an empty repository at home locally (_git init_) and bringing a remote branch repository back to it (_git fetch_) and merge it on your master branch. We will work on these new sources on the branch by default (master). It is possible to create branches and work on them. At any time, you can know where you are and if any changes have been made with _git status_
|
|
|
|
|
|
|
|
|
|
|
|
|
For user2 (Robert) :
|
|
For user1 (Robert) :
|
|
|
|
|
|
|
|
First, if the first time on git, please modify your ~/.gitconfig file or create it:
|
|
First, if the first time on git, please modify your ~/.gitconfig file or create it:
|
|
|
```
|
|
```
|
| ... | @@ -80,33 +75,30 @@ git config --global user.name "Robert" |
... | @@ -80,33 +75,30 @@ git config --global user.name "Robert" |
|
|
git config --global user.email "Robert@domain.fr"
|
|
git config --global user.email "Robert@domain.fr"
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
Prepare your environment, for each configurations go to see tab and instructions in details [Configurations](https://git.outils-is.ird.fr/legos_atnum/repos/nemo_cfgs/setup/wikis/Configurations):
|
|
Prepare your environment, for each configurations go to see tab and instructions in details [Configurations](https://git.outils-is.ird.fr/legos_atnum/repos2/nemo_cfgs/setup/wikis/Configurations):
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
WRKDIR=$(pwd)
|
|
WRKDIR=$(pwd)
|
|
|
mkdir -p ${WRKDIR}/NEMO_CFGS/models/NEMO
|
|
mkdir -p ${WRKDIR}/NEMOREF
|
|
|
mkdir -p ${WRKDIR}/NEMO_CFGS/setup
|
|
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
Then clone repos...:
|
|
###### Download official repo (with appropriate revision rXXXX):
|
|
|
```
|
|
```
|
|
|
>cd ${WRKDIR}/NEMO_CFGS/models/NEMO
|
|
cd ${WRKDIR}/NEMOREF
|
|
|
>git clone https://username@git.outils-is.ird.fr/legos_atnum/repos/nemo_cfgs/models/nemosrc.git dev_XXXXX_config_legos
|
|
svn co -rXXXX https://forge.ipsl.jussieu.fr/nemo/svn/NEMO/releases/release-4.0.1 dev_rXXXX_config_legos
|
|
|
Cloning into 'dev_XXXXX_config_legos'...
|
|
|
|
|
|
|
|
|
|
>cd ${WRKDIR}/NEMO_CFGS/setup
|
|
|
|
|
>git clone https://username@git.outils-is.ird.fr/legos_atnum/repos/nemo_cfgs/setup.git CONFIG_CASE
|
|
|
|
|
Cloning into 'CONFIG_CASE'...
|
|
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
You will have 2 directories now
|
|
###### Download legos repos... (with appropiate username):
|
|
|
* NEMO_CFGS/models/NEMO/dev_XXXXX_config_legos which have all the code of Official NEMO and our contributions
|
|
```
|
|
|
* NEMO_CFGS/setup/CONFIG_CASE Which give to user tools or specific files for running the configuration
|
|
cd ${WRKDIR}
|
|
|
|
git clone https://username@git.outils-is.ird.fr/legos_atnum/repos2/nemo_cfgs.git NEMO_CFGS
|
|
|
|
```
|
|
|
|
|
|
|
|
|
###### Choose configuration experiment
|
|
|
|
|
|
|
|
###### Go to NEMO repos and create a new branch and work on it
|
|
User have to go to NEMO repos and create a new branch and work on it
|
|
|
```
|
|
```
|
|
|
>cd ${WRKDIR}/NEMO_CFGS/models/NEMO/dev_XXXXX_config_legos
|
|
>cd ${WRKDIR}/NEMO_CFGS/
|
|
|
>git checkout -b Myconfig
|
|
>git checkout -b Myconfig
|
|
|
Switched to a new branch 'Myconfig'
|
|
Switched to a new branch 'Myconfig'
|
|
|
|
|
|
| ... | @@ -119,19 +111,20 @@ master |
... | @@ -119,19 +111,20 @@ master |
|
|
>git checkout Myconfig-CASE
|
|
>git checkout Myconfig-CASE
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
###### Only for developers with access permissions on gitlab repos!
|
|
Then create new nemo directory...:
|
|
|
```
|
|
```
|
|
|
>cd ${WRKDIR}/NEMO_CFGS/models/NEMO
|
|
mv -f ${WRKDIR}/NEMO_CFGS/models/NEMO/* ${WRKDIR}/NEMOREF/dev_rXXXX_config_legos/.
|
|
|
>git remote -v
|
|
mv ${WRKDIR}/NEMOREF/dev_rXXXX_config_legos/ ${WRKDIR}/NEMO_CFGS/models/NEMO/.
|
|
|
origin https://git.outils-is.ird.fr/legos_atnum/repos/nemo_cfgs/models/nemosrc.git (fetch)
|
|
|
|
|
origin https://git.outils-is.ird.fr/legos_atnum/repos/nemo_cfgs/models/nemosrc.git (push)
|
|
|
|
|
|
|
|
|
|
>git status
|
|
|
|
|
# On branch Myconfig
|
|
|
|
|
nothing to commit, working directory clean
|
|
|
|
|
>git push -u origin Myconfig
|
|
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
You will have 2 directories now
|
|
|
|
* NEMO_CFGS/models/NEMO/ Which have all our contributions and official code
|
|
|
|
* NEMO_CFGS/setup/ Which give to user tools or specific files for running the configuration
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a name="introduction-usage-example"></a>
|
|
<a name="introduction-usage-example"></a>
|
|
|
========================
|
|
========================
|
|
|
#### Example
|
|
#### Example
|
| ... | |
... | |
| ... | | ... | |