But! No expectation to actually start using it… :) It took me months after I learned it before I started actually using it.
At the end of this session you will be able:
For Git within RStudio:
For Git in general:
Common “version control”
Version control is a system that manages changes to a file or files. These changes are kept as logs in a history, with detailed information on what file(s) was changed, what was changed within the file, who changed it, and a message on why the change was made. This is extremely useful, especially when working in teams or for yourself 6 months in the future (because you will forget things)!
To understand how incredibly powerful version control is, think about these questions (or refer to the comic above!): How many files of different versions of a manuscript or thesis do you have laying around after getting feedback from your supervisor or co-authors? Have you ever wanted to experiment with your code or your manuscript and need to make a new file so that the original is not touched? Have you ever deleted something and wish you hadn’t? Have you ever forgotten what you were doing on a project? All these problems are fixed by using version control (git)!
We are going to go over a typical workflow. This could be either a solo workflow or a collaborative workflow. All of this will be done through RStudio.
From xkcd
git init, git clone (GitHub)git status, git log, git diffgit add, git commitgit checkout, git branch (may be covered)git push, git pullCan also all be done through the RStudio Git interface!
All the commands and exercises will be done during the code-along.
This work is licensed under a Creative Commons Attribution 4.0 International License. See the licensing page for more details about copyright information.