Get yourself an account at one of the Distributed Version Control servers. Github, Gitlab, Bitbucket (which run Git only) are popular choices with free plans. Sourceforge (which runs both Git and Mercurial) is also popular. There is also a server at AU [gitlab.au.dk] but you will probably not be able to access it after graduation. Alternatively, any POSIX box with a static IP address running Apache and Git (like sdfeu.org) would do.
Nowadays the code repositories use comparatively complicated authentication methods. Here is how you can do it in Github:
ssh-keygen -t rsa -N MyPassPhrase -f ~/.ssh/id_rsawhere "MyPassPhrase" should be your own personal passphrase that you can remember. This creates a pair of keys: a public key ("~/.ssh/id_rsa.pub"), and a private key ("~/.ssh/id_rsa"). The passphrase is encoded in the keys. There is no way do decode it, so if you forget your passphrase you will need to generate new keys.
~/.ssh
" directory. Github will probably ask you for the
passphrase of the key. You need to remember it.
Read about Git at Bitbucket[→] (or any other place) and/or about Mercurial at mercurial-scm.org.
Install Git or Mercurial at your box,
sudo apt install gitor
sudo apt install mercurial
If you choose to use the ssh access to your server (which many servers support, I believe), generate a pair of RSA keys at your box,
ssh-keygen -t rsa -N MyPassPhrase -f ~/.ssh/id_rsaand provide your server (must be somewhere in your settings) with a copy of your public key "~/.ssh/id_rsa.pub".
If you choose some other authentication method, read the corresponding manual at your server.
At your server: create a new project with an indicative name like "PPNM" :). You might need to read your server's documentation about how you do this.
At your box:
mkdir ~/repos
cd ~/repos
git clone address-of-your-repositoryor, if you use mercurial
hg clone address-of-your-repository
git add --all git commit --all --message 'did this and that blah blah...' git pushor, if you use mercurial,
hg add hg commit --message 'an indicative message describing commit' hg pushThe long options can be abbreviated as
-a
and -m
.