Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

gitFlow and GitHub flow

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

50 minutes

Ten people, one file

Ten developers all change the same program on the same day. Nobody has rules.

Aisha fixes a bug. Ben adds a feature that is not finished. Sam deletes a file. The program stops working. Nobody knows whose change broke it.

A workflow gives the team rules so this does not happen.

Key words

WordWhat it means
RepositoryA store for code and its full history.
BranchA separate line of work. Changes on a branch do not touch the main code.
CommitA saved step in the history, with a message.
StageChoose which changes go into the next commit.
PushSend your commits from your computer to the server.
MergeJoin the changes from one branch into another.
Pull requestA request to merge your branch. Others can review it first.
Main branchThe branch that always holds the working, released code.
Feature branchA short branch made for one new feature.
ReleaseA version of the software that is given to users.
HotfixA quick fix for a serious bug in the released software.
WorkflowThe steps a team follows to get a change into the released code.

The cells students fill in are left blank in this preview.

GitHub flow: simple

GitHub flow has one rule: the main branch is always ready to release.

To make a change, you make a short feature branch from main. You commit. You open a pull request. Others review it and tests run. Then you merge it into main and release.

It suits a team that releases often, such as a website.

Quick check: GitHub flow

Have a go

Quick check: GitHub flow

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

gitFlow: more steps

gitFlow has more branches and more rules.

The main branch holds only released versions. A develop branch holds the next version. Each feature has its own branch from develop. A release branch gets the next version ready. A hotfix branch fixes a bug in main at once.

It suits software with planned versions, such as a game or a banking app.

Which flow when?

GitHub flowgitFlow
Branches that stay for a long timeOne: mainTwo: main and develop
Other branchesShort feature branchesFeature, release and hotfix branches
ReleaseOften, straight from mainWhen a planned version is ready
Good forWebsites and small teamsProducts with versions to support
Weak atSeveral versions at onceSpeed: many steps for a small change

The cells students fill in are left blank in this preview.

The lesson goes on

12 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.