Automated Version Control


Figure 1

“Piled Higher and Deeper” by Jorge Cham, http://www.phdcomics.com
“Piled Higher and Deeper” by Jorge Cham, http://www.phdcomics.com

Figure 2

Changes Are Saved Sequentially

Figure 3

Different Versions Can be Saved

Figure 4

Multiple Versions Can be Merged

Setting Up Git


Creating a Repository


Tracking Changes


Figure 1

The Git Staging Area

Figure 2

The Git Commit Workflow

Exploring History


Figure 1

Git Checkout

Figure 2

https://figshare.com/articles/How_Git_works_a_cartoon/1328266

Ignoring Things


Remotes in GitHub


Figure 1

Creating a Repository on GitHub (Step 1)

Figure 2

Creating a Repository on GitHub (Step 2)

Figure 3

Creating a Repository on GitHub (Step 3)

Figure 4

The Local Repository with Git Staging Area

Figure 5

Freshly-Made GitHub Repository

Figure 6

Where to Find Repository URL on GitHub

Figure 7

Changing the Repository URL on GitHub

Figure 8

GitHub Repository After First Push

Collaborating


Figure 1

Adding Collaborators on GitHub

Figure 2

After Creating Clone of Repository

Conflicts


Figure 1

The Conflicting Changes

Open Science


Licensing


Citation


Hosting


Supplemental: Using Git from RStudio


Figure 1

RStudio screenshot showing the file menu dropdown with "New Project..." selected

Figure 2

RStudio screenshot showing New Project dialog window with "Create project from existing directory" selected

Figure 3


Figure 4

RStudio window after new project is created with large arrow pointing to vertical Git menu bar.

Figure 5


Figure 6

RStudio screenshot showing the Git menu dropdown with "Commit..." selected

Figure 7


Figure 8

RStudio screenshot showing the git menu dropdown with "History" selected

Figure 9


Figure 10

RStudio screenshot showing .gitignore open in the editor pane with the files .Rproj.user, .Rhistory, .RData, and *.Rproj added to the end