Version control with Git

This course is based on materials by Software Carpentry


In this lesson we use Git from the Unix Shell. Some previous experience with the shell is expected, but is not mandatory. Alternatively, this course can be followed on Windows using Git Bash.

You will need a GitHub account for the afternoon session. Please sign up for an account this morning if you do not already have an account.


Workshop slideshow

Cheat sheet of commands and key points

git --help provides some summary information on common commands and their usage.


Setup Download files required for the lesson
09:30 1. Introduction Why use version control?
09:40 2. Tracking changes with a local repository How do I get started with Git?
Where does Git store information?
10:15 3. Looking at history and differences How can I see what changed between commits?
How do I go back to a previous version of my project?
10:50 4. Break Break
11:05 5. Commit advice How, what, and when to commit?
What makes a good commit message?
11:20 6. Branching What is a branch?
How can I merge changes from another branch?
12:00 7. Lunch break Break
13:00 8. Undoing changes How can I discard unstaged changes?
How do I edit the last commit?
How can I undo a commit?
13:30 9. Working from multiple locations with a remote repository What is a remote repository
How can I use GitHub to work from multiple locations?
14:05 10. Collaborating with a remote repository How do I update my local repository with changes from the remote?
How can I collaborate using Git?
14:40 11. Break Break
14:55 12. Rebasing What is rebasing?
15:20 13. Pull Requests How can I contribute to a repository to which I don’t have write access?
Where can I discuss changes to my code?
What GitHub tools can I use to plan my work?
15:40 14. Conclusions and further information Where can I find out more?
15:50 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.