Gitflow: feature branches
Gitflow is a named rule for which branches exist, what they are called, and where work starts and merges back. The course covers its five branch roles: main and develop, which live as long as the project, and short-lived feature, release and hotfix branches. It shows the git-flow command-line tool, the double merge that keeps a fixed bug from returning, and GitHub Flow as the simpler alternative for continuous delivery. It ends by checking this app's branch history and applying both flows to a production bug.
What you'll learn
- ✓Gitflow's two long-lived branches and three short-lived roles
- ✓Using the git-flow start and finish commands
- ✓The double merge for release and hotfix branches
- ✓How GitHub Flow works and when it fits
- ✓Reading a repository's history to identify its branch model
- ✓Choosing a flow based on how a team ships
What a flow adds on top of branches and merges
git checkout -b feature/x, git merge --no-ff, resolving a conflict, git rebase, opening a pull request, squashing on merge: "Git branching & checkout", "Git merging & conflicts" and "GitHub pull requests" already taught every one of those, and you ran them yourself. This course doesn't reteach any…
Read the full lesson free →Curriculum
7 lessonsWhat a flow adds on top of branches and merges
Explains what a flow adds to branching: a team rule for which branches exist, their names and merge targets.
Gitflow's five branch roles
Describes Gitflow's long-lived main and develop branches and the feature, release and hotfix roles, with their start and merge points.
The git-flow CLI: automating the commands you already know
Shows how the git-flow CLI wraps ordinary checkout, merge and tag commands for features, releases and hotfixes.
Release and hotfix branches: the double-merge trap
Explains why release and hotfix branches must merge into both main and develop, or a fixed bug returns.
GitHub flow: the continuous-delivery alternative
Presents GitHub Flow, with one long-lived main branch, pull requests and deploys after merge, and when Gitflow's author prefers it.
This app's branch model, checked against its history
Checks this project's remote branches, merged pull requests and tags, which all point to GitHub Flow.
Putting it together: choosing a flow
Applies both flows to a production bug during a large feature and frames the choice around scheduled releases.