CS 257: Software Design

Lab: git workflow

In class. Nothing to hand in.

In this lab, you'll learn about GitHub Flow, a common way for small teams to work effectively with git. GitHub Flow lets individual team members do work that doesn't interfere with anybody else's work, and also provides a collaborative process for merging indviduals' work with the shared central code.

The workflow from Alice's perspective

As with our previous git lab, you should have one person/clone play the role of Alice and another person/clone play the role of Alice's teammate Bob.

Bob gets involved

Alice and Bob tidy up

The rampageFeature branch has now done its job. It gave Alice an isolated place to work without messing up the master branch or whatever Bob might have been working on at the time. But once Alice's code is ready to be part of the main codebase and has been merged into the master branch, nobody needs rampageFeature hanging around anymore. It has been deleted from the github copy of the repository, but now Alice and Bob both need to remove it from their local copies of the repository.

So both Alice and Bob do this:

That's it

In brief:

This blog post gives you more info about how GitHub as a software development team thinks about this workflow. Worth reading if you're interested in more thoughts on the subject. (Note that "git-flow" is an earlier, more complicated workflow than GitHub Flow, more suited to large teams and large projects.)