Skip to content

Version Control

dukevis edited this page Jun 30, 2016 · 5 revisions

Version Control

Keeping track of your R code will save a lot of headaches down the road. Using version control software can allow you to keep your projects synced across multiple machines, help you revert to previous versions if you introduce an error, and encourage good data management practices in general.

Git and Github

  • Command line git
    Using git on the command line takes some practice. There are plenty of resources to learn command line git, like the git book and Try Git. Usually you use command line git to clone (download) and commit (upload) files from and to a GitHub repository, but it can be used to connect to repositories on other servers, too.
  • Gitlab
    Duke hosts a Gitlab instance so that people with a netid can create private repositories. Just use the Duke Shibboleth Login to get started.
  • Github website
    Github is a free resource for hosting public repositories. There are paid accounts available for hosting private repostories, but students can sign up for the Student Developer Pack to get free private repositories, and other educational staff and faculty can request a discount. Benefit of using the Github website include automatic rendering of certain kinds of files (Jupyter notebook, GeoJSON/TopoJSON, CSV, STL) and website hosting for projects through Github Pages.
  • Github Desktop client
    The Github Desktop client makes it easier to sync files on your computer with files on Github. Just sign into your Github account, and the software will help you create or clone repositories that can then be synced to the Github server. This is basically an alternative to using git from the command line.
  • Git and Github with RStudio
    You could fill a library with all of the training videos, webguides, and books on github.... the following resources focus on using Rstudio/git/githib and do a great job. One thing that is often implied (but is crucial to note) is that Rstudio's project management features play a large role in using git/github. Even if you decide to never use git or github, I'd strongly recommend exploring the rstudio project features- they are very handy!!!

Bitbucket

Bitbucket is similar to Github but offers unlimited free public and private repositories for up to 5 users per account. If you sign up with your academic email address, your account should automatically be converted to an unlimited academic plan. RStudio can send files to Bitbucket, just as it can to Github. Bitbucket can also be used with the Desktop software SourceTree.

Clone this wiki locally