Home

Collaboration with git

You know about git from earlier notes. These notes explain more about the workflow of using git in teams.

Workflow

Simple workflow

Image adapted from Sonassi’s guide.

Branching & merging

It’s bad form to develop on the master branch. When you do so, you often find yourself stuck with difficult merges for nearly every pushed commit.

Better is to create a branch for yourself, work in that branch for a few days, then merge it into master and delete it. Create a branch for each distinct “feature” that you’re working on. This will make merges easier, since each feature often involves disjoint sets of files.

Branching and merging

Image adapted from Sonassi’s guide.

Cheatsheet

Download this image here.

Git cheatsheet
CSCI 221 material by Joshua Eckroth is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. Source code for this website available at GitHub.