In the following sections we will discuss what a version control system is, and demonstrate RStudio's version control capabilities.
As a project matures, scripts and reports are often adjusted, rewritten, or discarded altogether. These changes are usually improvements, but it's easy to make a mistake and you may wish to revert changes every now and then. Also, you may want to perform some experiments that require large changes in your scripts. Beginner programmers often solve this by making copies of files with special extensions such as .old
or .1
. After a while, such solutions usually end up in a kludge of files and directories from which it is hard to obtain the correctly running version, especially when working with many people on a single project. Version control systems are a great way to cope with such a development process.
There are many version control systems available, both proprietary and free, but all systems at least allow you to...