Further reading

There is no way that we can cover everything that you need to get started with git. I recommend that you work through the first two chapters of the git book (free and online!). It won't take long and you can skim through sections. This is 95% of what you need to know to use git by yourself. If you read the third chapter you know 99% of what you need to use git in a collaborative team.

There are some good online tutorials online; these two might be of particular interest this one focusses on using git with github and this one gives a nice bit of extra motivation.

Here is a beginner-focussed tutorial we use in another course that focusses on using git from within R.

GitHub is amazing and makes it easy to do a lot with git. In particular it makes it easy to * see diffs, comparing different versions of your project easily, and without having to remember the command syntax. * examine logs so you can see what happened by file, or over the whole project. * use blame to see who changed what line in a file and when. * to help collaborate with other people on code. * use "pull requests", which mean you can easily contribute to other people's projects and they can easily control what is added to their project. * set up continuous integration, so that you know as soon as something goes wrong.

bitbucket is much the same, and both offer educational accounts.

If you don't like git, you might like Mercurial. If that doesn't do it for you, there are many, many others but bear in mind that it's important to use similar systems to people you might work with.