blob: da9ad789809f81eeb365b3974daa0a3270ff5892 [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 Driessen12c4ab42010-01-26 22:11:19 +01008Installing git-flow
9-------------------
Vincent Driessen149d1542010-10-20 22:11:25 +020010If you're on a Mac and use "homebrew":http://github.com/mxcl/homebrew, it's simple:
11
12 $ brew install git-flow
13
14If you're on a Mac and use "MacPorts":http://macports.org/, it's simple:
15
16 $ port install git-flow
17
18Another easy way to install git-flow is using Rick Osborne's excellent git-flow
19installer, which can be run using the following command:
Vincent Driessen4f0f5392010-07-10 17:05:27 +020020
21 $ wget -q -O - http://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | sudo sh
22
eddie ciancic2130522010-09-05 01:19:35 +080023For __Windows__ users who wish to use the automated install, it is suggested that you install [Cygwin](http://www.cygwin.com/)
JP Totoea738ef2010-08-20 04:56:57 +080024first to install tools like sh and wget. Then simply follow the command:
25
Vincent Driessen149d1542010-10-20 22:11:25 +020026 C:\> wget -q -O - http://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | sh
JP Totoea738ef2010-08-20 04:56:57 +080027
Vincent Driessen4f0f5392010-07-10 17:05:27 +020028If you prefer a manual installation, please use the following instructions.
Vincent Driessen13c94822010-02-15 20:09:02 +010029After downloading the sources from Github, also fetch the submodules:
30
31 $ git submodule init
32 $ git submodule update
33
34Then, you can install `git-flow`, using:
Vincent Driessenf206ba62010-01-26 12:44:41 +010035
Vincent Driessen12c4ab42010-01-26 22:11:19 +010036 $ sudo make install
Vincent Driessenf206ba62010-01-26 12:44:41 +010037
Vincent Driessene0b54c02010-03-19 19:27:38 +010038By default, git-flow will be installed in /usr/local. To change the prefix
39where git-flow will be installed, simply specify it explicitly, using:
Vincent Driessen12c4ab42010-01-26 22:11:19 +010040
Vincent Driessene0b54c02010-03-19 19:27:38 +010041 $ sudo make prefix=/opt/local install
Vincent Driessendd720be2010-01-27 00:00:09 +010042
43Or simply point your `PATH` environment variable to your git-flow checkout
44directory.
Vincent Driessenf206ba62010-01-26 12:44:41 +010045
Vincent Driessenb17b8982010-08-25 21:25:36 +020046*Installation note:*
47git-flow depends on the availability of the command line utility `getopt`,
48which may not be available in your Unix/Linux environment. Please use your
49favorite package manager to install `getopt`. For Cygwin, install the
Vincent Driessen47d1b9d2010-10-08 11:20:00 +020050`util-linux` package to get `getopt`. If you use `apt-get` as your install
51manager, the package name is `opt`.
Vincent Driessenb17b8982010-08-25 21:25:36 +020052
Vincent Driessenf206ba62010-01-26 12:44:41 +010053
Vincent Driessenec0b8542010-07-22 14:57:16 +020054Integration with your shell
55---------------------------
Vincent Driessen25def712010-08-25 21:25:57 +020056For those who use the [Bash](http://www.gnu.org/software/bash/) or
57[ZSH](http://www.zsh.org) shell, please check out the excellent work on the
Vincent Driessenec0b8542010-07-22 14:57:16 +020058[git-flow-completion](http://github.com/bobthecow/git-flow-completion) project
59by [bobthecow](http://github.com/bobthecow). It offers tab-completion for all
60git-flow subcommands and branch names.
61
Vincent Driessen25def712010-08-25 21:25:57 +020062For Windows users, [msysgit](http://code.google.com/p/msysgit/) is a good
63starting place for installing git.
JP Totoac949bf2010-08-20 05:01:52 +080064
Vincent Driessenec0b8542010-07-22 14:57:16 +020065
Vincent Driessen11965b32010-09-06 12:19:20 +020066FAQ
67---
Vincent Driessen75678682010-10-25 22:25:41 +020068See the [FAQ](http://github.com/nvie/gitflow/wiki) section of the project Wiki.
Vincent Driessencb922282010-09-22 20:38:55 +020069
Vincent Driessen11965b32010-09-06 12:19:20 +020070
Vincent Driessen78c73dc2010-01-21 00:48:44 +010071Please help out
72---------------
Vincent Driessenc49c7932010-02-24 01:22:48 +010073This project is still under development. Feedback and suggestions are very
74welcome and I encourage you to use the [Issues
75list](http://github.com/nvie/gitflow/issues) on Github to provide that
Vincent Driessenf206ba62010-01-26 12:44:41 +010076feedback.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010077
Vincent Driessend79a0d42010-04-04 16:11:44 +020078Feel free to fork this repo and to commit your additions. For a list of all
79contributors, please see the [AUTHORS](AUTHORS) file.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010080
Vincent Driessen1fd5bcf2010-07-15 23:21:21 -070081Any questions, tips, or general discussion can be posted to our Google group:
Vincent Driessen4d8b3792010-08-19 20:01:30 +020082[http://groups.google.com/group/gitflow-users](http://groups.google.com/group/gitflow-users)
Vincent Driessen1fd5bcf2010-07-15 23:21:21 -070083
Vincent Driessen78c73dc2010-01-21 00:48:44 +010084
Vincent Driessen5d1dbe72010-04-04 15:52:55 +020085License terms
86-------------
87git-flow is published under the liberal terms of the BSD License, see the
88[LICENSE](LICENSE) file. Although the BSD License does not require you to share
89any modifications you make to the source code, you are very much encouraged and
90invited to contribute back your modifications to the community, preferably
91in a Github fork, of course.
92
93
Vincent Driessenc49c7932010-02-24 01:22:48 +010094Typical usage:
95--------------
Vincent Driessenb731e6f2010-08-19 20:00:02 +020096For the best introduction to get started to `git flow`, please read Jeff
97Kreeftmeijer's blog post:
98
Vincent Driessen4d8b3792010-08-19 20:01:30 +020099[http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/](http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/)
Vincent Driessenb731e6f2010-08-19 20:00:02 +0200100
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100101
Vincent Driessenc49c7932010-02-24 01:22:48 +0100102### Initialization
103
104To initialize a new repo with the basic branch structure, use:
Vincent Driessen12c4ab42010-01-26 22:11:19 +0100105
Vincent Driessenc49c7932010-02-24 01:22:48 +0100106 git flow init
Vincent Driessenf9ebb072010-02-22 07:56:04 +0100107
Vincent Driessenc49c7932010-02-24 01:22:48 +0100108This will then interactively prompt you with some questions on which branches
109you would like to use as development and production branches, and how you
110would like your prefixes be named. You may simply press Return on any of
111those questions to accept the (sane) default suggestions.
112
113
114### Creating feature/release/hotfix/support branches
Vincent Driessen12c4ab42010-01-26 22:11:19 +0100115
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100116* To list/start/finish feature branches, use:
117
118 git flow feature
119 git flow feature start <name> [<base>]
120 git flow feature finish <name>
121
Vincent Driessen010252a2010-02-04 10:31:29 +0100122 For feature branches, the `<base>` arg must be a commit on `develop`.
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100123
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100124* To list/start/finish release branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100125
Vincent Driessen04839ae2010-01-28 01:07:20 +0100126 git flow release
Vincent Driessen010252a2010-02-04 10:31:29 +0100127 git flow release start <release> [<base>]
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100128 git flow release finish <release>
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100129
Vincent Driessen010252a2010-02-04 10:31:29 +0100130 For release branches, the `<base>` arg must be a commit on `develop`.
131
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100132* To list/start/finish hotfix branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100133
Vincent Driessen04839ae2010-01-28 01:07:20 +0100134 git flow hotfix
Vincent Driessen010252a2010-02-04 10:31:29 +0100135 git flow hotfix start <release> [<base>]
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100136 git flow hotfix finish <release>
Vincent Driessen010252a2010-02-04 10:31:29 +0100137
138 For hotfix branches, the `<base>` arg must be a commit on `master`.
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100139
140* To list/start support branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100141
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100142 git flow support
Vincent Driessen010252a2010-02-04 10:31:29 +0100143 git flow support start <release> <base>
144
145 For support branches, the `<base>` arg must be a commit on `master`.
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100146
Vincent Driessenb33ea8a2010-08-24 13:58:32 +0200147
148Showing your appreciation
149=========================
150A few people already requested it, so now it's here: a Flattr button.
151
152Of course, the best way to show your appreciation for the original
153[blog post](http://nvie.com/git-model) or the git-flow tool itself remains
154contributing to the community. If you'd like to show your appreciation in
155another way, however, consider Flattr'ing me:
156
157[![Flattr this][2]][1]
158
159[1]: http://flattr.com/thing/53771/git-flow
160[2]: http://api.flattr.com/button/button-static-50x60.png