Git is a distributed version control system mostly used for computer source code. It a mostly Linux program but there are Windows versions. It's a good idea to keep track of your source code in git. A good getting started guide can be found here.
There is a CMM git server at http://molmod29.ugent.be/cgi-bin/gitweb.cgi (only reachable from the office).
If you want to publish your code worldwide, use a site like github. You can request a set of 5 private repo's on github if you have an academic account: More info on https://education.github.com/.
The UGent has its own github for internal use, you can find it here: https://github.ugent.be/ You can only access it with a valid UGent account.
Do not use the CMM git server anymore. Use the UGent version of github. It is better on every front.
How to you add your code to the CMM git server?
Make a 'bare' clone of your git repository on your local pc:
git clone --bare REPO_DIR REPO_DIR.git
Copy the REPO_DIR.git directory to /var/cache/git/ on molmod29. Make sure the permission on the directory are correct: you are the owner and you have read and write permissions.
To be able to fetch and push, do the following on your local repository:
git remote add origin ssh://molmod29/var/cache/git/REPO_DIR.git
git push and git fetch should work now.
Optional steps:
In REPO_DIR.git on molmod29:
- the file description contains an optional description of the code
- touch the file git-daemon-export-ok to allow a clone of the repo through the git protocol.
- in the file config add:
[gitweb]
owner = "<YOUR NAME>"
For a Shared Repository
In REPO_DIR.git on molmod29, execute the following:
git config --local core.sharedRepository true
Now recursively change the group of the REPO_DIR.git to a group which contains all members the need to have write access, for example 'cmm'
chown -R cmm REPO_DIR.git
As last, make sure the setgid bit is set to keep the group on all new subdirectories:
find REPO_DIR.git -type d -exec chmod g+s '{}' ';'