Using branches

A big advantage of Git is that we can not only use it really well for smaller projects, on which just a few people work, but also for much bigger software projects on which several hundred developers work. And so, Git provides a lot of different tools to manage all kinds of different situations.

One of the most important functions is called Branches. They give us the ability to try out something experimental or split our commits. The default branch is master. So, you actually have already been using branches, as this branch was where you committed all your changes to.

We can create our own branches with the checkout function:

git checkout –b <branch name>

After we create our new branch, we can see it in the Git pane in RStudio. So, ...

Get Mastering RStudio – Develop, Communicate, and Collaborate with R now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.