What is Version Control?
The practice of tracking and managing changes to software code
We will focus on Git and GitHub as our version control system of choice!
Git:
GitHub:
Create an account on GitHub (https://github.com) – this is free
Log in on the GitHub website
Let’s talk about some of the key details and functionality here, namely what a repository is!
Follow the instructions here, for your operating system, to install Git: https://happygitwithr.com/install-git.html
Copy your Personal Access Token (PAT)
Enter password or token: Paste PAT
We’re following the directions here: https://happygitwithr.com/rstudio-git-github.html
Make a repository (repo) on GitHub
Clone the test GitHub repository to your computer via RStudio
In RStudio, start a new Project
File > New Project > Version Control > Git
In RStudio, open the README.md
file and add the line “This is a line from RStudio”. Save your changes
Commit these changes to your local repo from RStudio:
README.md
Click the green “Push” button to send your local changes to your GitHub repo!
Git Pull (or Pull) is a command used to update the local version of a repo from a remote repo.
This can be a very important first step in your workflow when working in a repo with multiple people!
Everything we just did through RStudio can be done from the command line (ew?)
GitHub Desktop is a wonderful and lightweight application for all of our Git/GitHub-related needs that works independent of any other application