Skip to content

Instantly share code, notes, and snippets.

@davesag
Created March 7, 2016 05:20
Show Gist options
  • Save davesag/1d935bee3a25d82e2a30 to your computer and use it in GitHub Desktop.
Save davesag/1d935bee3a25d82e2a30 to your computer and use it in GitHub Desktop.
Transitioning to Git Flow — a primer.

Transitioning to git-flow.

Set up GitHub

  1. create a develop branch
  2. in settings => branches choose develop as the default branch and click update
  3. also in settings => branches choose to protect the master branch.

Udate your clone of your fork

In your terminal, in the project folder:

  1. git fetch upstream to from your master branch to sync your fork with the upstream.
  2. git checkout -b develop to create your local develop branch
  3. git pull upstream develop to pull down the changes
  4. git push -u origin develop to connect your local branch to your fork

Then run git flow init and accept the defaults:

> git flow init

Which branch should be used for bringing forth production releases?
   - master
   - develop
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? [] 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment