FAIR Forward 2025
Workshop #4:
Basics of Version Control using Git
1
September 24 2025 | biodatasage.com/fair
Where are you zooming in from?
2
Drop your city/state in the chat!
This is part 4 of a series!
3
This workshop and hackathon series is supported by an Open Research Community Accelerator grant.
What is FAIR Forward?
Findable, Accessible, Interoperable, and Reusable
33
4
5 preparatory Workshops
Virtual Hackathon
Open-Source Data Science Learning Materials
Today’s focus
5
What is Git?
Why use Git?
Git vs GitHub
Basic Git Flow + Walkthrough
GitHub Desktop
Disaster strikes when:
6
Your computer crashes
You accidentally close a script without saving
You want to experiment with your code
You need to collaborate on a group project
Version control to the rescue!
7
Think Google Docs but for code!
Quick example: YRBS data
8
In our last workshop, we explored data manipulation with R using YRBS data
Previous scripts
9
In our last workshop, we explored data manipulation with R using YRBS data
What if your script breaks here and you want to go back to step 2 of your analysis?
File Name Chaos
10
What if you made additional analyses and updates to your script?
With Git
11
Every version is saved automatically!
Git VS GitHub
12
Git (local)
GitHub (cloud)
https://github.com
Basic Git Flow
13
A folder for your programming project that can contain:
Repository/Repo
a set of files
Basic Git Flow
14
Repository/Repo
a set of files
Diff = add/save
Basic Git Flow
15
a set of files
Diff = add/save
Commit = describe the change
Repository/Repo
a set of files
Basic Git Flow
16
Diff = add/save
Commit = describe the change
Push = send and store to the cloud
Repository/Repo
a set of files
Basic Git Flow
17
Diff = add/save
Commit = describe the change
Push = send and store to the cloud
Repository/Repo
a set of files
Pull
How do we do all of this on RStudio?�
18
19
Write notes here
Write code here
Results here
Objects (data) here
Written files here
20
Git Pane
21
Diff = add/save
Diff Example
22
Diff = add/save
Say we wanted to export our filtered dataset from our last workshop into a CSV:
23
Diff = add/save
We observe that the changed R notebook file and exported CSV shows up in the Git pane
24
Diff = add/save
25
Commit = describe the change
26
Commit = describe the change
Commit message
27
Commit = describe the change
Storing files in the cloud
28
Push = send and store to the cloud
Refreshing your files from the cloud
29
Diff = add/save
Repository/Repo
a set of files
Pull
Pulling lets you:
History in Git
30
History shows you what changes you’ve made to your project
History in Git
31
History shows you what changes you’ve made to your project
History in Git
32
History shows you what changes you’ve made to your project
Recap: Git Flow
33
Diff = add/save
Commit = describe the change
Push = send and store to the cloud
Repository/Repo
a set of files
Pull
Uploading your project to GitHub
34
Register a GitHub account
35
Simple Rules:
Remember: You'll use this username for years, so pick something you'll still like later!
�
Demo: Create a GitHub Repo & Clone Repo in RStudio
36
Introduce yourself to Git
37
git config --global user.name "Jane Doe"
git config --global user.email "jane@example.com"
git config --global --list
Two ways:
1. Commands from the terminal
*substitute the name with your name and email associated with your GitHub account
Introduce yourself to Git
38
git config --global user.name "Jane Doe"
git config --global user.email "jane@example.com"
git config --global --list
Two ways:
1. Commands from the terminal
install.packages("usethis")
library(usethis)
use_git_config(user.name = "Jane Doe", user.email = "jane@example.org")
2. Using the usethis R package
*substitute the name with your name and email associated with your GitHub account
Demo: Token generation & �Save > Commit > Push
39
Github Desktop
40
Github Desktop
41
Github Desktop
42
For tutorials and how to use GitHub Desktop: https://docs.github.com/en/desktop
Additional Resources
43
Q&A
44
Let’s continue the conversation!
Join our slack channel:
45
Coming up next….
Workshop 5
Introduction to Data Visualization in R
October 10th 4pm EST
46
Register now!
Thank you for attending!
47