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
| Word | What it means |
|---|---|
| Repository | A store for code and its full history. |
| Branch | A separate line of work. Changes on a branch do not touch the main code. |
| Commit | A saved step in the history, with a message. |
| Stage | Choose which changes go into the next commit. |
| Push | Send your commits from your computer to the server. |
| Merge | Join the changes from one branch into another. |
| Pull request | A request to merge your branch. Others can review it first. |
| Main branch | The branch that always holds the working, released code. |
| Feature branch | A short branch made for one new feature. |
| Release | A version of the software that is given to users. |
| Hotfix | A quick fix for a serious bug in the released software. |
| Workflow | The 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 questionsYour 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 flow | gitFlow | |
|---|---|---|
| Branches that stay for a long time | One: main | Two: main and develop |
| Other branches | Short feature branches | Feature, release and hotfix branches |
| Release | Often, straight from main | When a planned version is ready |
| Good for | Websites and small teams | Products with versions to support |
| Weak at | Several versions at once | Speed: many steps for a small change |
The cells students fill in are left blank in this preview.