This is a gist to capture useful notes on using git.
N.B. There's a good Github tutorial on Youtube at: https://www.youtube.com/watch?v=0fKg7e37bQE
Some git commands which I have found to be useful are:
git branch # To find what branch you are on
git branch -a # To list all branches
git status
git add -A
git commit -m "some commit message"
git push
git checkout -- filename # To restore a file which has been deleted
git checkout some_branch # Check out branch 'some_branch' (i.e. switch to that branch)
git merge some_branch # Merge branch 'some_branch' into the current branch (e.g. master)