Skip to content

Instantly share code, notes, and snippets.

@kohenkatz
Created April 27, 2018 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kohenkatz/01a19eb9b9a959a64a2538649ad9606f to your computer and use it in GitHub Desktop.
Save kohenkatz/01a19eb9b9a959a64a2538649ad9606f to your computer and use it in GitHub Desktop.
Git Flow introduction

How to set up git-flow

Installation - if using git on the command line

Linux

wget https://raw.githubusercontent.com/petervanderdoes/gitflow-avh/develop/contrib/gitflow-installer.sh
sudo bash gitflow-installer.sh install stable
rm gitflow-installer.sh

You may also choose to install git-flow-completion

MacOS

brew install git-flow-avh

Windows

The Git for Windows installer includes git-flow built-in as of version 2.6.4 (released 2015-12-08), so no additional installation is needed

Project setup

If using git on the command line

cd /path/to/your/git/project
git flow init

You will be asked to answer a few questions. It will look something like this:

Branch name for production releases: [master]
Branch name for "next release" development: [develop]

How to name your supporting branch prefixes?
Feature branches? [feature/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/]
Version tag prefix? []

You should accept all the default options by pressing Enter/Return.

If using SmartGit

  • Go to the "Branch" menu
  • Go to the "Git-Flow" submenu
  • Click "Configure"
  • If prompted, choose "Change Configuration"
  • Choose "Git-Flow Type": "Full (feature, release, hotfix, support branches)"
  • Click "Reset to defaults" at the bottom of the window
  • Click "OK"

Resources to learn about git-flow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment