Frist of all you need to have git installed on your machine or you can use the cluster git. With a direct cluster connection, you can copy the m.swim code to your machine like this:
git clone git@gitlab.pik-potsdam.de:wortmann/m.swim.git
Now you have the entire code (incl. documentation) in the m.swim directory wherever you executed the clone command. Make your changes to the code and commit them inside local m.swim directory like this: Check what files are changed and will be commited
git status
Check what lines have changed
git diff
Show what has been prevously changed (the commits) and branches (opens window with gui, i.e. you need X Windows set up!)
gitk
Add individual files to the commit
git add <file>
... and then commit
git commit -m 'Short description of what has changed'
... or you just commit all files that have changed without adding them:
git commit -a -m 'Short description of what has changed'
Now you can make these commits to the central cluster directory by 'pushing' them to it. You'll first have to set up the remote repository with any name (pik.m.swim) like this:
git remote add pik.m.swim <username>@cluster.pik-potsdam.de://wortmann/src/grass7/m.swim.git
Or you can leave out the '
git push pik.m.swim master
To update your local m.swim repository just 'fetch' or 'pull' (fetch+merge) it using the previously set up server name pik.m.swim: To first fetch the changes and examine them
git fetch pik.m.sim master
Or to fetch and merge the changes to your local repository straight away
git pull pik.m.swim master