Version Control via Git and Github
Lesson synopsis (1.5 - 2 hours)
This lesson teaches the concept of version control using git. The lesson begins with a slides describing the motivations for using version control and Github. The first activity is a follow along partner activity which explores git in GitHub only (
02-git-in-github). Since the project is never brought locally onto the students computer, the students do not need to install git for this project. The second activity starts with a demo in RStudio which can be followed along if the students have installed git (
03-git-in-rstudio). This activity introduces the students to using git on their computers.
Before this lessons, students should:
02-git-in-github: Obtain a Github account. If you sign up using a student email you get five free private repositories through a student developer pack.
02-git-in-rstudio: Install Git for use in RStudio. Follow installation instructions from RStudio. Suggested This step should be done at the end of day 1.
At the end of this module you should be able to:
- Define git vocabulary (commit, fork, pull request, repository, commit message).
- Demonstrate ability to navigate through a Github repository main page.
- Define the difference between a directory and a repository.
- Create a repository on GitHub.
- Demonstrate ability to commit changes to text files with a commit message.
- Evaluate repository History.
- Create a pull request to someone else's repository.
- Define git vocabulary (push, fork, local repository, remote repository)
- Fork remote repository from Github into RStudio.
- Navigate through the basics of using git in RStudio.
- Push local repository from RStudio to Github.
- Demonstrate the ability to host code from RStudio to Github.
01-motivation-sides.md: slides that introduce version control, git, and GitHub.
02-git-in-github-instructors.md: instructor notes for exercise that uses
02-git-in-github-slides.html: git in Github activity.
03-git-in-rstudio-slides.html: git in RStudio activity.
04-resources-for-learning.md- incomplete, a file that can be used as a reference for self learning git.
People and credits
Please post feedback and issues with the lesson on the repository's issue tracker. For instructor questions about teaching this lesson, you can also contact the corresponding author directly.