Appendix F — Git
Keeping track of the many versions of documents that inevitably eventuate when working on a project—especially when collaborating with others—is difficult1. Git is a powerful, popular open-source version control system used today. When used in conjunction with a platform like GitHub or GitLab for hosting files, Git excels at making managing documents, figures, raw data, and source code easier.
If you are new to version control with Git & GitHub, this cartoon is a nice introduction!
To getting started with using Git in R, check out Happy Git and GitHub for the useR.
F.1 Using Git
Git commands may be executed in a shell using a command line (e.g., Git Bash), but there are a number of user-friendly Git clients (e.g. Github Desktop, RStudio git pane, GitKraken) that make the process of learning git less daunting if you are just getting started. Below are some examples and links to download.
Git Bash is the default way to interact with Git from the command line.
GitHub Desktop is a more visual point-and-click interface to using Git and GitHub.
The git pane in R Studio integrates Git functionality into R Studio.
GitKraken is a popular third-party Git client with an all-in-one interface.
For additional useful Git clients, check out the GUI page of the Git website.
If you’ve ever tried to work out which of
draft_ms_final
,draft_ms_last_edits
, andms_last_edits_final_final
is the most updated version of a document, Git is for you.↩︎