Skip to content

coverfy/gitflow

 
 

Repository files navigation

git-flow

A collection of Git extensions to provide high-level repository operations for Vincent Driessen's branching model.

Includes customisations to adapt it to our use case:

  • Delete remote on feature finish
  • Force pull from develop branch before feature start if diverged
  • Force pull from master branch before hotfix start if diverged
  • Push to origin after performing finish
  • Use current branch when not specified in command line
  • Fetch from origin before performing finish
  • Squash feature during merge
  • Do not tag releases

Getting started

For the best introduction to get started with git flow, please read Jeff Kreeftmeijer's blog post:

http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/

Or have a look at one of these screen casts:

Installing git-flow

Use the following command:

$ wget --no-check-certificate -q -O - https://github.com/coverfy/gitflow/raw/develop/contrib/gitflow-installer.sh | sudo sh

By default, git-flow will be installed in /usr/local.

Integration with your shell

If you want autocompletion for the git flow commands, we have forked the git-flow-completion project. Just install it and avoid some keypresses :)

License terms

git-flow is published under the liberal terms of the BSD License, see the LICENSE file. Although the BSD License does not require you to share any modifications you make to the source code, you are very much encouraged and invited to contribute back your modifications to the community, preferably in a Github fork, of course.

Initialization

To initialize a new repo with the basic branch structure, use:

	git flow init

This will then interactively prompt you with some questions on which branches you would like to use as development and production branches, and how you would like your prefixes be named. You may simply press Return on any of those questions to accept the (sane) default suggestions.

Creating feature/release/hotfix/support branches

  • To list/start/finish feature branches, use:

      git flow feature
      git flow feature start <name> [<base>]
      git flow feature finish <name>
    

    For feature branches, the <base> arg must be a commit on develop.

  • To list/start/finish hotfix branches, use:

      git flow hotfix
      git flow hotfix start <release> [<base>]
      git flow hotfix finish <release>
    

    For hotfix branches, the <base> arg must be a commit on master.

Packages

No packages published

Languages

  • Shell 59.4%
  • Makefile 20.6%
  • Batchfile 20.0%