Git Flow

Using git flow -- or not

Install

OSX - Homebrew
$ brew install git-flow
OSX - Macports
$ ports install git-flow
Linux
$ apt-get install git-flow
Windows (Cygwin)
$ wget -q -O - --no-check-certificate https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | bash

Initialize

$ cd my/project
$ git commit -am "Initial commit"
$ git remote add origin git@github.com:username/Project-Name.git
$ git push -u origin main

Prepare Repository for Development

Create development branch, push it to the server

$ git checkout -b develop
$ git push -u origin develop

Setup Git Flow

You will be prompted, as seen below, for what branches you'd like to use. You can just hit `enter` for all.

Notes:

  1. To use the defaults you can use the `-d` flag
  2. You can set a default version tag prefix if you prefer. eg: `v`
$ git flow init [-d]
Which branch should be used for bringing forth production releases?
   - develop
   - main
Branch name for production releases: [main]

Which branch should be used for integration of the "next release"?
   - develop
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? []