Agenda
- What is GitHub? Git?
- Understanding the terminology
- Showoff Github.com
- Show how GitHub & Git & R Studio all work together
- Have the lab install Git and connect to R Studio (fingers crossed this works)
- All work on 2 examples together!
What is GitHub?
https://www.youtube.com/watch?v=w3jLJU7DT5E&t=1s
Terminology:
Term | Definition |
---|---|
Repository (repo) | project folder with files, documentation & revision history |
Issue | dicussion thread |
Clone | copy of a repo that's local |
Fork | copy of repo that stays on your GitHub account |
Branch | parallel version of a repo |
Commit | revision / ‘saving’ a file |
Push | sending commits to your repo |
Pull request | tells others about changes you've pushed/proposing |
Merge | the changes from one branch are applied to another |
Fetch | refresh / getting latest changes |
First lab exercise
- Create your own repo on GitHub
- Clone it to RStudio
- Create an R file in RStudio
- Commit changes and push
Second lab exercise
- Fork and clone this repo
- Open RStudio and edit the R file
- Commit changes and push
- Create a pull request
- Merge to base branch
Helpful Links:
Download Git: https://git-scm.com/downloads
Connect to Git: https://happygitwithr.com/hello-git.html#hello-git
git config --global user.name 'Jane Doe'
git config --global user.email '[email protected]'
git config --global --list
Alternative using RStudio: https://happygitwithr.com/hello-git.html#hello-git
Connect Git to RStudio: https://happygitwithr.com/rstudio-git-github.html
PC: .../Local/Programs/Git/bin/git.exe
Mac: .../usr/local/bin/git.exe
Markdown Cheatsheet: https://guides.github.com/pdfs/markdown-cheatsheet-online.pdf
Github Desktop: https://desktop.github.com/
For a laugh: https://github.com/EugeneKay/git-jokes/blob/lulz/Jokes.txt