git-flow cheatsheet created by Daniel Kummer
FreeA cheatsheet on the usage of git flow
FreeFree tier
About git-flow cheatsheet created by Daniel Kummer
git-flow cheatsheet is a concise reference guide for using git-flow, a set of Git extensions that implement Vincent Driessen's branching model. It covers the essential operations for feature branches, release management, and hotfixes, along with setup instructions for macOS, Linux, and Windows. The cheatsheet provides clear command examples and explains the effects of each action, such as merging and branch deletion, and includes tips on using the Sourcetree GUI for git-flow support.
Key Features
Setup instructions for macOS (Homebrew, MacPorts), Linux (apt-get), and Windows (Cygwin)
Initialize git-flow in an existing Git repository with customizable branch naming
Feature branch management: start, finish, publish, pull, and track features
Release branch management: start with optional commit base, publish, track, and finish (merges to master and develop, tags release)
Hotfix branch management: start with version name and optional basename, finish (merges to master and develop, tags version)
Merge-based workflow (does not rebase feature branches)
Notes on using Sourcetree as a GUI client with git-flow support
Command line help hints and output guidance
Pros & Cons
Pros
- Clear, concise command examples for each git-flow operation
- Covers all major git-flow workflows: features, releases, hotfixes
- Includes platform-specific setup instructions (macOS, Linux, Windows)
- Open source and freely available as a GitHub Pages site
- Provides integration tips for Sourcetree GUI
Cons
- Assumes basic knowledge of Git and branching concepts
- Does not cover advanced scenarios or branching model theory in depth
- Static reference page – no interactive or search features
- Only documents basic usage; experienced users may need more details
Best For
Developers adopting Vincent Driessen's branching modelQuick reference for git-flow command syntax and workflow stepsLearning how to manage feature, release, and hotfix branchesSetting up git-flow in a new or existing project
FAQ
What is git-flow?
git-flow is a set of Git extensions that provide high-level repository operations for Vincent Driessen's branching model. It simplifies managing feature, release, and hotfix branches.
How do I install git-flow?
On macOS via Homebrew: 'brew install git-flow-avh' or MacPorts: 'port install git-flow-avh'. On Linux: 'apt-get install git-flow'. On Windows (Cygwin): run the provided installer script (requires wget and util-linux).
How do I start working on a new feature with git-flow?
Use 'git flow feature start MYFEATURE'. This creates a new branch based on 'develop' and switches to it.
How do I finish a feature and merge it back?
Use 'git flow feature finish MYFEATURE'. It merges the feature branch into 'develop', removes the feature branch, and switches back to 'develop'.
How do I publish a feature for collaboration?
Use 'git flow feature publish MYFEATURE' to push the feature branch to the remote server. Other users can then use 'git flow feature pull origin MYFEATURE' or 'git flow feature track MYFEATURE' to get it.
How do I create a release branch?
Use 'git flow release start RELEASE [BASE]'. Optionally specify a commit sha-1 on 'develop' as the base. It's recommended to publish the release branch with 'git flow release publish RELEASE' for team collaboration.
What happens when I finish a release?
Finishing a release merges the release branch into 'master', tags the release with its name, back-merges into 'develop', and removes the release branch. Don't forget to push tags with 'git push origin --tags'.
How do I create a hotfix?
Use 'git flow hotfix start VERSION [BASENAME]'. The version is the hotfix release name. Optionally specify a basename (e.g., a tag on master) to start from.