Obtain a copy of the model (using git)

Use the command

git clone https://github.com/metno/noresm

If you get error messages, verify that you can open the page https://github.com/metno/noresm in a web-browser. If you can not, you are probably not a github-user or not member of the noresm group on github. Send email to alf.grini@met.no (with a copy to trond.iversen@met.no) to get the right permissions. You can create the github user yourself. Go to https://github.com/join and create a user. Make user-name which is easy to understand, for example FirstnameLastname. You can attach several email-addresses to the same user.

Verify that you have the correct checkout

Check that your favourite branch is available using the command <git branch --all>

To check out (locally) your favourite branch and to start working on it, write

git checkout -b myBranchName origin/myBranchName

(Note that myBranchName must be one of the branches listed by the above command)

If you don't user the “-b” option, you will get something which is not correct. Make sure you are tracking a remote branch. You can write

git branch -vv

to see which remote branch you are tracking.

Note that once a branch has been checked out using the -b option, you can switch between any of your checked out branches using the command

git checkout aCheckOutBranchName

Modify files

Modify the code (for example a file named myChangedFile.F90) and send back to your local repository through

git add myCHangedFile.F90

git commit -m "aMessage"

Verify, using the tool “gitk” that the changes make sense.

Send modifications to github

This command assumes that your changes go to the remote branch named like your branch (which is most of the times the case)

git push

You can also do (to be completely sure):

git push remoteName myLocalBranchName:remoteBranchName

which if your are changing the master-branch would translate to

git push origin master:master

(The above command means push my changes to the remote named “origin” from my local branch named master to the remote branch named master. If you are changing another branch than master, you must obviously not write “master”.