blob: 35bd90a89724f3fababf1e6c586805525a711961 [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 Driessen4f0f5392010-07-10 17:05:27 +020010The easiest way to install git-flow is using Rick Osborne's excellent
11git-flow installer, which can be run using the following command:
12
13 $ wget -q -O - http://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | sudo sh
14
15If you prefer a manual installation, please use the following instructions.
Vincent Driessen13c94822010-02-15 20:09:02 +010016After downloading the sources from Github, also fetch the submodules:
17
18 $ git submodule init
19 $ git submodule update
20
21Then, you can install `git-flow`, using:
Vincent Driessenf206ba62010-01-26 12:44:41 +010022
Vincent Driessen12c4ab42010-01-26 22:11:19 +010023 $ sudo make install
Vincent Driessenf206ba62010-01-26 12:44:41 +010024
Vincent Driessene0b54c02010-03-19 19:27:38 +010025By default, git-flow will be installed in /usr/local. To change the prefix
26where git-flow will be installed, simply specify it explicitly, using:
Vincent Driessen12c4ab42010-01-26 22:11:19 +010027
Vincent Driessene0b54c02010-03-19 19:27:38 +010028 $ sudo make prefix=/opt/local install
Vincent Driessendd720be2010-01-27 00:00:09 +010029
30Or simply point your `PATH` environment variable to your git-flow checkout
31directory.
Vincent Driessenf206ba62010-01-26 12:44:41 +010032
33
Vincent Driessenec0b8542010-07-22 14:57:16 +020034Integration with your shell
35---------------------------
36For those who use the [Bash](http://www.gnu.org/software/bash/) shell, please
37check out the excellent work on the
38[git-flow-completion](http://github.com/bobthecow/git-flow-completion) project
39by [bobthecow](http://github.com/bobthecow). It offers tab-completion for all
40git-flow subcommands and branch names.
41
42If you are a [zsh](http://www.zsh.org) user with some plugin-writing
43experience, please help us develop a
44[completion plugin](http://github.com/bobthecow/git-flow-completion/issues#issue/1)
45for zsh, too. Please contact me on [Github](http://github.com/inbox/new/nvie)
46or [Twitter](http://twitter.com/nvie) to discuss details.
47
48
Vincent Driessen78c73dc2010-01-21 00:48:44 +010049Please help out
50---------------
Vincent Driessenc49c7932010-02-24 01:22:48 +010051This project is still under development. Feedback and suggestions are very
52welcome and I encourage you to use the [Issues
53list](http://github.com/nvie/gitflow/issues) on Github to provide that
Vincent Driessenf206ba62010-01-26 12:44:41 +010054feedback.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010055
Vincent Driessend79a0d42010-04-04 16:11:44 +020056Feel free to fork this repo and to commit your additions. For a list of all
57contributors, please see the [AUTHORS](AUTHORS) file.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010058
Vincent Driessen1fd5bcf2010-07-15 23:21:21 -070059Any questions, tips, or general discussion can be posted to our Google group:
Vincent Driessen19111012010-07-15 23:21:55 -070060http://groups.google.com/group/gitflow-users
Vincent Driessen1fd5bcf2010-07-15 23:21:21 -070061
Vincent Driessen78c73dc2010-01-21 00:48:44 +010062
Vincent Driessen5d1dbe72010-04-04 15:52:55 +020063License terms
64-------------
65git-flow is published under the liberal terms of the BSD License, see the
66[LICENSE](LICENSE) file. Although the BSD License does not require you to share
67any modifications you make to the source code, you are very much encouraged and
68invited to contribute back your modifications to the community, preferably
69in a Github fork, of course.
70
71
Vincent Driessenc49c7932010-02-24 01:22:48 +010072Typical usage:
73--------------
Vincent Driessen78c73dc2010-01-21 00:48:44 +010074
Vincent Driessenc49c7932010-02-24 01:22:48 +010075### Initialization
76
77To initialize a new repo with the basic branch structure, use:
Vincent Driessen12c4ab42010-01-26 22:11:19 +010078
Vincent Driessenc49c7932010-02-24 01:22:48 +010079 git flow init
Vincent Driessenf9ebb072010-02-22 07:56:04 +010080
Vincent Driessenc49c7932010-02-24 01:22:48 +010081This will then interactively prompt you with some questions on which branches
82you would like to use as development and production branches, and how you
83would like your prefixes be named. You may simply press Return on any of
84those questions to accept the (sane) default suggestions.
85
86
87### Creating feature/release/hotfix/support branches
Vincent Driessen12c4ab42010-01-26 22:11:19 +010088
Vincent Driessenc81e7a22010-01-28 00:33:24 +010089* To list/start/finish feature branches, use:
90
91 git flow feature
92 git flow feature start <name> [<base>]
93 git flow feature finish <name>
94
Vincent Driessen010252a2010-02-04 10:31:29 +010095 For feature branches, the `<base>` arg must be a commit on `develop`.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010096
Vincent Driessenc81e7a22010-01-28 00:33:24 +010097* To list/start/finish release branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +010098
Vincent Driessen04839ae2010-01-28 01:07:20 +010099 git flow release
Vincent Driessen010252a2010-02-04 10:31:29 +0100100 git flow release start <release> [<base>]
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100101 git flow release finish <release>
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100102
Vincent Driessen010252a2010-02-04 10:31:29 +0100103 For release branches, the `<base>` arg must be a commit on `develop`.
104
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100105* To list/start/finish hotfix branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100106
Vincent Driessen04839ae2010-01-28 01:07:20 +0100107 git flow hotfix
Vincent Driessen010252a2010-02-04 10:31:29 +0100108 git flow hotfix start <release> [<base>]
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100109 git flow hotfix finish <release>
Vincent Driessen010252a2010-02-04 10:31:29 +0100110
111 For hotfix branches, the `<base>` arg must be a commit on `master`.
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100112
113* To list/start support branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100114
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100115 git flow support
Vincent Driessen010252a2010-02-04 10:31:29 +0100116 git flow support start <release> <base>
117
118 For support branches, the `<base>` arg must be a commit on `master`.
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100119