Have you emailed snippets of code with your colleagues, only to get stuck trying to find which email has the right code? In this tutorial, I will demonstrate how to collaborate on code with others using Git. We will cover branching, opening pull requests, doing code reviews, resolving code conflicts, and undoing any mistakes you may make along the way. This talk assumes basic Git knowledge.
This tutorial will assume that participants have basic Git knowledge, though anyone who is interested is welcome to attend. If you are unfamiliar with Git, I recommend Software Carpentry's tutorial.
We will be doing some Git work together, so participants should have Git installed and should have a personal GitHub account. If participants would prefer to use a graphical interface, I recommend using SourceTree. Note that to install SourceTree, you will need to create a personal BitBucket account.
- What happens when multiple people try to commit code at once?
- Using branches and merges
- Opening issues in GitHub
- Creating a pull request
- Doing code reviews
- Fixing conflicts
- Merging your code back in
Fixing mistakes (as time permits)
- Reverts and resets
- Whoops, I just committed my password...