Branching & GitHub Flow

Think about how you generally work on some code. You write some code then decide you want to try something else, so you make a copy, maybe you name it version-2. Then you decide you want to try something else, you copy and name it version-3.

Now you have a litter of different files for different features you’ve tried out.

Git branching solves this problem by providing a clean way to make copies of your code to work on a specific feature.


Working smoothly with teams

Branches for every feature

Code reviews for everybody


GitHub Flow

There’s a process called GitHub Flow that’s very popular for working on teams.

The idea is that your master branch should never be coded on directly. Instead you should create a new branch for each feature you’re adding.

When you are satisfied with your changes you sync to GitHub, make a pull request, get feedback and merge.

1. Make a new branch in the GitHub app

2. Publish the branch

3. Add new features to your code and commit regularly

4. Sync the branch to GitHub

5. Press the compare & review button

6. Select the new branch

7. Create a pull request

8. Request feedback

9. Merge the new branch with master

10. Delete the branch

11. In the GitHub app, switch to master

12. Sync

13. Delete the local branch


Video list

  1. GitHub: branching and merging