[]

Exercise "git/mercurial"

  1. Create a (public) repository for your exercises and homeworks using either git or mercurial.
Hints:
  1. Read about git at Bitbucket[] (or any other place) and/or about mercurial at mercurial-scm.org and choose one of them.
  2. Get yourself an account on one of the Distributed Version Control servers. Bitbucket, Github, and Gitlab (which run git only) are popular choices with free plans. Sourceforge (which runs both git and mercurial) is another possibility. Yet another possibility is gitlab.au.dk.
  3. Install git/mercrial on your box,
    sudo apt install git
    
    or
    sudo apt install mercurial
    
  4. At the server:
    create a new empty project with an indicative name (like "ppnm" :) and find out its address (depends on the server).
  5. At your box:
    make a directory for your repositories,
    mkdir ~/repos
    
    go to your directory,
    cd ~/repos
    
    clone your (empty) repository from the server to this directory,
    git clone address-of-your-repository
    
    or, if you use mercurial
    hg clone address-of-your-repository
    
    Do your exercises in (subdirectories of) this directory, commit changes, and push the commit to the server,
    git add --all
    git commit --all --message 'did this and that blah blah...'
    git push
    
    or, if you use mercurial,
    hg add
    hg commit --message 'an indicative message describing commit'
    hg push
    
    The long options can be abbreviated as -a and -m.