blob: c7238e6f0f6eb47b1f8b80b10013dfd2ff10eb73 [file] [log] [blame]
Vincent Driessen679f05f2012-02-13 20:53:21 +01001git-flow
Vincent Driessen6c2d30b2010-01-26 22:18:36 +01002========
Vincent Driessen679f05f2012-02-13 20:53:21 +01003
Vincent Driessen12c4ab42010-01-26 22:11:19 +01004A collection of Git extensions to provide high-level repository operations
Vincent Driessen4fc0bc12010-02-24 01:43:04 +01005for Vincent Driessen's [branching model](http://nvie.com/git-model "original
Vincent Driessen78c73dc2010-01-21 00:48:44 +01006blog post").
7
Vincent Driessenf206ba62010-01-26 12:44:41 +01008
Vincent Driessen553776f2011-01-31 22:43:06 +01009Getting started
10---------------
11For the best introduction to get started with `git flow`, please read Jeff
12Kreeftmeijer's blog post:
13
14[http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/](http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/)
15
16Or have a look at one of these screen casts:
17
Vincent Driessen766159d2011-11-24 13:02:00 +010018* [How to use a scalable Git branching model called git-flow](http://buildamodule.com/video/change-management-and-version-control-deploying-releases-features-and-fixes-with-git-how-to-use-a-scalable-git-branching-model-called-gitflow) (by Build a Module)
Vincent Driessen553776f2011-01-31 22:43:06 +010019* [A short introduction to git-flow](http://vimeo.com/16018419) (by Mark Derricutt)
20* [On the path with git-flow](http://codesherpas.com/screencasts/on_the_path_gitflow.mov) (by Dave Bock)
21
22
Vincent Driessen12c4ab42010-01-26 22:11:19 +010023Installing git-flow
24-------------------
Vincent Driessen07dacd52011-12-06 22:12:54 +010025See the Wiki for up-to-date [Installation Instructions](https://github.com/nvie/gitflow/wiki/Installation).
Vincent Driessenb17b8982010-08-25 21:25:36 +020026
Vincent Driessenf206ba62010-01-26 12:44:41 +010027
Vincent Driessenec0b8542010-07-22 14:57:16 +020028Integration with your shell
29---------------------------
Vincent Driessen25def712010-08-25 21:25:57 +020030For those who use the [Bash](http://www.gnu.org/software/bash/) or
31[ZSH](http://www.zsh.org) shell, please check out the excellent work on the
Vincent Driessenec0b8542010-07-22 14:57:16 +020032[git-flow-completion](http://github.com/bobthecow/git-flow-completion) project
33by [bobthecow](http://github.com/bobthecow). It offers tab-completion for all
34git-flow subcommands and branch names.
35
Vincent Driessenec0b8542010-07-22 14:57:16 +020036
Vincent Driessen11965b32010-09-06 12:19:20 +020037FAQ
38---
Vincent Driessen61f2c692010-10-31 06:22:36 +010039See the [FAQ](http://github.com/nvie/gitflow/wiki/FAQ) section of the project
40Wiki.
Vincent Driessencb922282010-09-22 20:38:55 +020041
Vincent Driessen11965b32010-09-06 12:19:20 +020042
Vincent Driessen78c73dc2010-01-21 00:48:44 +010043Please help out
44---------------
Vincent Driessenc49c7932010-02-24 01:22:48 +010045This project is still under development. Feedback and suggestions are very
46welcome and I encourage you to use the [Issues
47list](http://github.com/nvie/gitflow/issues) on Github to provide that
Vincent Driessenf206ba62010-01-26 12:44:41 +010048feedback.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010049
Vincent Driessend79a0d42010-04-04 16:11:44 +020050Feel free to fork this repo and to commit your additions. For a list of all
51contributors, please see the [AUTHORS](AUTHORS) file.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010052
Vincent Driessen1fd5bcf2010-07-15 23:21:21 -070053Any questions, tips, or general discussion can be posted to our Google group:
Vincent Driessen4d8b3792010-08-19 20:01:30 +020054[http://groups.google.com/group/gitflow-users](http://groups.google.com/group/gitflow-users)
Vincent Driessen1fd5bcf2010-07-15 23:21:21 -070055
Eric Holmes938ea5f2011-11-29 00:14:30 -080056Contributing
57------------
Vincent Driessen49305ec2011-11-30 22:14:40 +010058Fork the repository. Then, run:
59
60 git clone --recursive git@github.com:<username>/gitflow.git
61 cd gitflow
62 git branch master origin/master
63 git flow init -d
64 git flow feature start <your feature>
65
66Then, do work and commit your changes. **Hint**: ``export PATH=`pwd`:$PATH``
67from within the gitflow directory makes sure you're using the version of
68gitflow you're currently developing.
69
70 git flow feature publish <your feature>
71
72When done, open a pull request to your feature branch.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010073
Vincent Driessen5d1dbe72010-04-04 15:52:55 +020074License terms
75-------------
76git-flow is published under the liberal terms of the BSD License, see the
77[LICENSE](LICENSE) file. Although the BSD License does not require you to share
78any modifications you make to the source code, you are very much encouraged and
79invited to contribute back your modifications to the community, preferably
80in a Github fork, of course.
81
82
Vincent Driessenc49c7932010-02-24 01:22:48 +010083### Initialization
84
85To initialize a new repo with the basic branch structure, use:
Vincent Driessen12c4ab42010-01-26 22:11:19 +010086
Lorin Hochstein5a586332011-12-20 10:17:54 -050087 git flow init [-d]
Vincent Driessenf9ebb072010-02-22 07:56:04 +010088
Vincent Driessenc49c7932010-02-24 01:22:48 +010089This will then interactively prompt you with some questions on which branches
90you would like to use as development and production branches, and how you
91would like your prefixes be named. You may simply press Return on any of
92those questions to accept the (sane) default suggestions.
93
Lorin Hochstein5a586332011-12-20 10:17:54 -050094The ``-d`` flag will accept all defaults.
95
Vincent Driessenc49c7932010-02-24 01:22:48 +010096
97### Creating feature/release/hotfix/support branches
Vincent Driessen12c4ab42010-01-26 22:11:19 +010098
Vincent Driessenc81e7a22010-01-28 00:33:24 +010099* To list/start/finish feature branches, use:
100
101 git flow feature
102 git flow feature start <name> [<base>]
103 git flow feature finish <name>
104
Vincent Driessen010252a2010-02-04 10:31:29 +0100105 For feature branches, the `<base>` arg must be a commit on `develop`.
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100106
Lorin Hochstein5a586332011-12-20 10:17:54 -0500107* To push/pull a feature branch to the remote repository, use:
108
109 git flow feature publish <name>
Lorin Hochstein905cfb12011-12-20 10:21:46 -0500110 git flow feature pull <remote> <name>
Lorin Hochstein5a586332011-12-20 10:17:54 -0500111
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100112* To list/start/finish release branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100113
Vincent Driessen04839ae2010-01-28 01:07:20 +0100114 git flow release
Vincent Driessen010252a2010-02-04 10:31:29 +0100115 git flow release start <release> [<base>]
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100116 git flow release finish <release>
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100117
Vincent Driessen010252a2010-02-04 10:31:29 +0100118 For release branches, the `<base>` arg must be a commit on `develop`.
119
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100120* To list/start/finish hotfix branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100121
Vincent Driessen04839ae2010-01-28 01:07:20 +0100122 git flow hotfix
Vincent Driessen010252a2010-02-04 10:31:29 +0100123 git flow hotfix start <release> [<base>]
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100124 git flow hotfix finish <release>
Vincent Driessen010252a2010-02-04 10:31:29 +0100125
126 For hotfix branches, the `<base>` arg must be a commit on `master`.
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100127
128* To list/start support branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100129
Vincent Driessenc81e7a22010-01-28 00:33:24 +0100130 git flow support
Vincent Driessen010252a2010-02-04 10:31:29 +0100131 git flow support start <release> <base>
132
133 For support branches, the `<base>` arg must be a commit on `master`.
Vincent Driessen78c73dc2010-01-21 00:48:44 +0100134
Vincent Driessenb33ea8a2010-08-24 13:58:32 +0200135
136Showing your appreciation
137=========================
138A few people already requested it, so now it's here: a Flattr button.
139
140Of course, the best way to show your appreciation for the original
141[blog post](http://nvie.com/git-model) or the git-flow tool itself remains
142contributing to the community. If you'd like to show your appreciation in
143another way, however, consider Flattr'ing me:
144
145[![Flattr this][2]][1]
146
147[1]: http://flattr.com/thing/53771/git-flow
148[2]: http://api.flattr.com/button/button-static-50x60.png