Skip to main content

Version Control

  • Chapter
  • First Online:
Book cover Beginning Data Science in R
  • 9813 Accesses

Abstract

Version control, in its simplest form, is used to track changes to your software. It is also an efficient way of collaborating on software development since it allows several developers to make changes to the software and merge them with changes from other developers. RStudio supports two version control systems, Subversion and git. Of these, git is the most widely used, and although these things are very subjective of course, I think that it is also the better system. It is certainly the system we use here.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Not the R terminal. You need to run this in an actual shell terminal for it to work. How you open a terminal depends on your platform. I can’t help you there. If you don’t know how to, it is time to fire up Google once again.

  2. 2.

    If you didn’t have a bare repository, you could still have connected the clones to see changes made to them, but pushing changes would be much more complicated. With a bare repository that both are cloned from, pushing changes upward is as easy as git push.

  3. 3.

    Some of the other GUIs that work with git have excellent support for working with branches. You should check them out.

  4. 4.

    You can also combine creating and checking out a branch using git checkout -b branchname if you want. That command creates the branch first and then checks it out. To change between branches later, though, use the checkout command without the -b option.

  5. 5.

    It is slightly more complex than this; you can have links to other repositories and pull from them or push to them (if they are bare repositories), and origin is just a default link to the one you cloned for. It is beyond the scope of these notes, however, to go into more details. If you always work with a single global repository that you push to and pull from, then you don’t need to know any more about links to remote repositories.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Thomas Mailund

About this chapter

Cite this chapter

Mailund, T. (2017). Version Control. In: Beginning Data Science in R. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2671-1_13

Download citation

Publish with us

Policies and ethics