blob: b41e9ed2a9b87a478a06613c0f5d8e759435eac3 [file] [log] [blame]
Vincent Driessen6c2d30b2010-01-26 22:18:36 +01001git-flow
2========
Vincent Driessen12c4ab42010-01-26 22:11:19 +01003A collection of Git extensions to provide high-level repository operations
Vincent Driessen4fc0bc12010-02-24 01:43:04 +01004for Vincent Driessen's [branching model](http://nvie.com/git-model "original
Vincent Driessen78c73dc2010-01-21 00:48:44 +01005blog post").
6
Vincent Driessenf206ba62010-01-26 12:44:41 +01007
Vincent Driessenc81e7a22010-01-28 00:33:24 +01008> **IMPORTANT NOTE:**
9> In release 0.2, the order of the arguments has changed to provide a logical
10> subcommand hierarchy.
Vincent Driessenf206ba62010-01-26 12:44:41 +010011
12
Vincent Driessen12c4ab42010-01-26 22:11:19 +010013Installing git-flow
14-------------------
Vincent Driessen4f0f5392010-07-10 17:05:27 +020015The easiest way to install git-flow is using Rick Osborne's excellent
16git-flow installer, which can be run using the following command:
17
18 $ wget -q -O - http://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | sudo sh
19
20If you prefer a manual installation, please use the following instructions.
Vincent Driessen13c94822010-02-15 20:09:02 +010021After downloading the sources from Github, also fetch the submodules:
22
23 $ git submodule init
24 $ git submodule update
25
26Then, you can install `git-flow`, using:
Vincent Driessenf206ba62010-01-26 12:44:41 +010027
Vincent Driessen12c4ab42010-01-26 22:11:19 +010028 $ sudo make install
Vincent Driessenf206ba62010-01-26 12:44:41 +010029
Vincent Driessene0b54c02010-03-19 19:27:38 +010030By default, git-flow will be installed in /usr/local. To change the prefix
31where git-flow will be installed, simply specify it explicitly, using:
Vincent Driessen12c4ab42010-01-26 22:11:19 +010032
Vincent Driessene0b54c02010-03-19 19:27:38 +010033 $ sudo make prefix=/opt/local install
Vincent Driessendd720be2010-01-27 00:00:09 +010034
35Or simply point your `PATH` environment variable to your git-flow checkout
36directory.
Vincent Driessenf206ba62010-01-26 12:44:41 +010037
38
Vincent Driessen78c73dc2010-01-21 00:48:44 +010039Please help out
40---------------
Vincent Driessenc49c7932010-02-24 01:22:48 +010041This project is still under development. Feedback and suggestions are very
42welcome and I encourage you to use the [Issues
43list](http://github.com/nvie/gitflow/issues) on Github to provide that
Vincent Driessenf206ba62010-01-26 12:44:41 +010044feedback.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010045
Vincent Driessend79a0d42010-04-04 16:11:44 +020046Feel free to fork this repo and to commit your additions. For a list of all
47contributors, please see the [AUTHORS](AUTHORS) file.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010048
Vincent Driessen1fd5bcf2010-07-15 23:21:21 -070049Any questions, tips, or general discussion can be posted to our Google group:
50 http://groups.google.com/group/gitflow-users
51
Vincent Driessen78c73dc2010-01-21 00:48:44 +010052
Vincent Driessen5d1dbe72010-04-04 15:52:55 +020053License terms
54-------------
55git-flow is published under the liberal terms of the BSD License, see the
56[LICENSE](LICENSE) file. Although the BSD License does not require you to share
57any modifications you make to the source code, you are very much encouraged and
58invited to contribute back your modifications to the community, preferably
59in a Github fork, of course.
60
61
Vincent Driessenc49c7932010-02-24 01:22:48 +010062Typical usage:
63--------------
Vincent Driessen78c73dc2010-01-21 00:48:44 +010064
Vincent Driessenc49c7932010-02-24 01:22:48 +010065### Initialization
66
67To initialize a new repo with the basic branch structure, use:
Vincent Driessen12c4ab42010-01-26 22:11:19 +010068
Vincent Driessenc49c7932010-02-24 01:22:48 +010069 git flow init
Vincent Driessenf9ebb072010-02-22 07:56:04 +010070
Vincent Driessenc49c7932010-02-24 01:22:48 +010071This will then interactively prompt you with some questions on which branches
72you would like to use as development and production branches, and how you
73would like your prefixes be named. You may simply press Return on any of
74those questions to accept the (sane) default suggestions.
75
76
77### Creating feature/release/hotfix/support branches
Vincent Driessen12c4ab42010-01-26 22:11:19 +010078
Vincent Driessenc81e7a22010-01-28 00:33:24 +010079* To list/start/finish feature branches, use:
80
81 git flow feature
82 git flow feature start <name> [<base>]
83 git flow feature finish <name>
84
Vincent Driessen010252a2010-02-04 10:31:29 +010085 For feature branches, the `<base>` arg must be a commit on `develop`.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010086
Vincent Driessenc81e7a22010-01-28 00:33:24 +010087* To list/start/finish release branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +010088
Vincent Driessen04839ae2010-01-28 01:07:20 +010089 git flow release
Vincent Driessen010252a2010-02-04 10:31:29 +010090 git flow release start <release> [<base>]
Vincent Driessenc81e7a22010-01-28 00:33:24 +010091 git flow release finish <release>
Vincent Driessen78c73dc2010-01-21 00:48:44 +010092
Vincent Driessen010252a2010-02-04 10:31:29 +010093 For release branches, the `<base>` arg must be a commit on `develop`.
94
Vincent Driessenc81e7a22010-01-28 00:33:24 +010095* To list/start/finish hotfix branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +010096
Vincent Driessen04839ae2010-01-28 01:07:20 +010097 git flow hotfix
Vincent Driessen010252a2010-02-04 10:31:29 +010098 git flow hotfix start <release> [<base>]
Vincent Driessenc81e7a22010-01-28 00:33:24 +010099 git flow hotfix finish <release>
Vincent Driessen010252a2010-02-04 10:31:29 +0100100
101 For hotfix branches, the `<base>` arg must be a commit on `master`.
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100102
103* To list/start support branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100104
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100105 git flow support
Vincent Driessen010252a2010-02-04 10:31:29 +0100106 git flow support start <release> <base>
107
108 For support branches, the `<base>` arg must be a commit on `master`.
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100109