Vincent Driessen | 877f5fe | 2010-12-06 14:54:50 -0800 | [diff] [blame] | 1 | git-flow  |
Vincent Driessen | 6c2d30b | 2010-01-26 22:18:36 +0100 | [diff] [blame] | 2 | ======== |
Vincent Driessen | 12c4ab4 | 2010-01-26 22:11:19 +0100 | [diff] [blame] | 3 | A collection of Git extensions to provide high-level repository operations |
Vincent Driessen | 4fc0bc1 | 2010-02-24 01:43:04 +0100 | [diff] [blame] | 4 | for Vincent Driessen's [branching model](http://nvie.com/git-model "original |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 5 | blog post"). |
| 6 | |
Vincent Driessen | f206ba6 | 2010-01-26 12:44:41 +0100 | [diff] [blame] | 7 | |
Vincent Driessen | 553776f | 2011-01-31 22:43:06 +0100 | [diff] [blame] | 8 | Getting started |
| 9 | --------------- |
| 10 | For the best introduction to get started with `git flow`, please read Jeff |
| 11 | Kreeftmeijer's blog post: |
| 12 | |
| 13 | [http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/](http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/) |
| 14 | |
| 15 | Or have a look at one of these screen casts: |
| 16 | |
Vincent Driessen | 766159d | 2011-11-24 13:02:00 +0100 | [diff] [blame] | 17 | * [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 Driessen | 553776f | 2011-01-31 22:43:06 +0100 | [diff] [blame] | 18 | * [A short introduction to git-flow](http://vimeo.com/16018419) (by Mark Derricutt) |
| 19 | * [On the path with git-flow](http://codesherpas.com/screencasts/on_the_path_gitflow.mov) (by Dave Bock) |
| 20 | |
| 21 | |
Vincent Driessen | 12c4ab4 | 2010-01-26 22:11:19 +0100 | [diff] [blame] | 22 | Installing git-flow |
| 23 | ------------------- |
Vincent Driessen | 07dacd5 | 2011-12-06 22:12:54 +0100 | [diff] [blame] | 24 | See the Wiki for up-to-date [Installation Instructions](https://github.com/nvie/gitflow/wiki/Installation). |
Vincent Driessen | b17b898 | 2010-08-25 21:25:36 +0200 | [diff] [blame] | 25 | |
Vincent Driessen | f206ba6 | 2010-01-26 12:44:41 +0100 | [diff] [blame] | 26 | |
Vincent Driessen | ec0b854 | 2010-07-22 14:57:16 +0200 | [diff] [blame] | 27 | Integration with your shell |
| 28 | --------------------------- |
Vincent Driessen | 25def71 | 2010-08-25 21:25:57 +0200 | [diff] [blame] | 29 | For those who use the [Bash](http://www.gnu.org/software/bash/) or |
| 30 | [ZSH](http://www.zsh.org) shell, please check out the excellent work on the |
Vincent Driessen | ec0b854 | 2010-07-22 14:57:16 +0200 | [diff] [blame] | 31 | [git-flow-completion](http://github.com/bobthecow/git-flow-completion) project |
| 32 | by [bobthecow](http://github.com/bobthecow). It offers tab-completion for all |
| 33 | git-flow subcommands and branch names. |
| 34 | |
Vincent Driessen | ec0b854 | 2010-07-22 14:57:16 +0200 | [diff] [blame] | 35 | |
Vincent Driessen | 11965b3 | 2010-09-06 12:19:20 +0200 | [diff] [blame] | 36 | FAQ |
| 37 | --- |
Vincent Driessen | 61f2c69 | 2010-10-31 06:22:36 +0100 | [diff] [blame] | 38 | See the [FAQ](http://github.com/nvie/gitflow/wiki/FAQ) section of the project |
| 39 | Wiki. |
Vincent Driessen | cb92228 | 2010-09-22 20:38:55 +0200 | [diff] [blame] | 40 | |
Vincent Driessen | 11965b3 | 2010-09-06 12:19:20 +0200 | [diff] [blame] | 41 | |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 42 | Please help out |
| 43 | --------------- |
Vincent Driessen | c49c793 | 2010-02-24 01:22:48 +0100 | [diff] [blame] | 44 | This project is still under development. Feedback and suggestions are very |
| 45 | welcome and I encourage you to use the [Issues |
| 46 | list](http://github.com/nvie/gitflow/issues) on Github to provide that |
Vincent Driessen | f206ba6 | 2010-01-26 12:44:41 +0100 | [diff] [blame] | 47 | feedback. |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 48 | |
Vincent Driessen | d79a0d4 | 2010-04-04 16:11:44 +0200 | [diff] [blame] | 49 | Feel free to fork this repo and to commit your additions. For a list of all |
| 50 | contributors, please see the [AUTHORS](AUTHORS) file. |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 51 | |
Vincent Driessen | 1fd5bcf | 2010-07-15 23:21:21 -0700 | [diff] [blame] | 52 | Any questions, tips, or general discussion can be posted to our Google group: |
Vincent Driessen | 4d8b379 | 2010-08-19 20:01:30 +0200 | [diff] [blame] | 53 | [http://groups.google.com/group/gitflow-users](http://groups.google.com/group/gitflow-users) |
Vincent Driessen | 1fd5bcf | 2010-07-15 23:21:21 -0700 | [diff] [blame] | 54 | |
Eric Holmes | 938ea5f | 2011-11-29 00:14:30 -0800 | [diff] [blame] | 55 | Contributing |
| 56 | ------------ |
Vincent Driessen | 49305ec | 2011-11-30 22:14:40 +0100 | [diff] [blame] | 57 | Fork the repository. Then, run: |
| 58 | |
| 59 | git clone --recursive git@github.com:<username>/gitflow.git |
| 60 | cd gitflow |
| 61 | git branch master origin/master |
| 62 | git flow init -d |
| 63 | git flow feature start <your feature> |
| 64 | |
| 65 | Then, do work and commit your changes. **Hint**: ``export PATH=`pwd`:$PATH`` |
| 66 | from within the gitflow directory makes sure you're using the version of |
| 67 | gitflow you're currently developing. |
| 68 | |
| 69 | git flow feature publish <your feature> |
| 70 | |
| 71 | When done, open a pull request to your feature branch. |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 72 | |
Vincent Driessen | 5d1dbe7 | 2010-04-04 15:52:55 +0200 | [diff] [blame] | 73 | License terms |
| 74 | ------------- |
| 75 | git-flow is published under the liberal terms of the BSD License, see the |
| 76 | [LICENSE](LICENSE) file. Although the BSD License does not require you to share |
| 77 | any modifications you make to the source code, you are very much encouraged and |
| 78 | invited to contribute back your modifications to the community, preferably |
| 79 | in a Github fork, of course. |
| 80 | |
| 81 | |
Vincent Driessen | c49c793 | 2010-02-24 01:22:48 +0100 | [diff] [blame] | 82 | ### Initialization |
| 83 | |
| 84 | To initialize a new repo with the basic branch structure, use: |
Vincent Driessen | 12c4ab4 | 2010-01-26 22:11:19 +0100 | [diff] [blame] | 85 | |
Lorin Hochstein | 5a58633 | 2011-12-20 10:17:54 -0500 | [diff] [blame] | 86 | git flow init [-d] |
Vincent Driessen | f9ebb07 | 2010-02-22 07:56:04 +0100 | [diff] [blame] | 87 | |
Vincent Driessen | c49c793 | 2010-02-24 01:22:48 +0100 | [diff] [blame] | 88 | This will then interactively prompt you with some questions on which branches |
| 89 | you would like to use as development and production branches, and how you |
| 90 | would like your prefixes be named. You may simply press Return on any of |
| 91 | those questions to accept the (sane) default suggestions. |
| 92 | |
Lorin Hochstein | 5a58633 | 2011-12-20 10:17:54 -0500 | [diff] [blame] | 93 | The ``-d`` flag will accept all defaults. |
| 94 | |
Vincent Driessen | c49c793 | 2010-02-24 01:22:48 +0100 | [diff] [blame] | 95 | |
| 96 | ### Creating feature/release/hotfix/support branches |
Vincent Driessen | 12c4ab4 | 2010-01-26 22:11:19 +0100 | [diff] [blame] | 97 | |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 98 | * To list/start/finish feature branches, use: |
| 99 | |
| 100 | git flow feature |
| 101 | git flow feature start <name> [<base>] |
| 102 | git flow feature finish <name> |
| 103 | |
Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 104 | For feature branches, the `<base>` arg must be a commit on `develop`. |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 105 | |
Lorin Hochstein | 5a58633 | 2011-12-20 10:17:54 -0500 | [diff] [blame] | 106 | * To push/pull a feature branch to the remote repository, use: |
| 107 | |
| 108 | git flow feature publish <name> |
Lorin Hochstein | 905cfb1 | 2011-12-20 10:21:46 -0500 | [diff] [blame] | 109 | git flow feature pull <remote> <name> |
Lorin Hochstein | 5a58633 | 2011-12-20 10:17:54 -0500 | [diff] [blame] | 110 | |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 111 | * To list/start/finish release branches, use: |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 112 | |
Vincent Driessen | 04839ae | 2010-01-28 01:07:20 +0100 | [diff] [blame] | 113 | git flow release |
Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 114 | git flow release start <release> [<base>] |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 115 | git flow release finish <release> |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 116 | |
Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 117 | For release branches, the `<base>` arg must be a commit on `develop`. |
| 118 | |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 119 | * To list/start/finish hotfix branches, use: |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 120 | |
Vincent Driessen | 04839ae | 2010-01-28 01:07:20 +0100 | [diff] [blame] | 121 | git flow hotfix |
Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 122 | git flow hotfix start <release> [<base>] |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 123 | git flow hotfix finish <release> |
Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 124 | |
| 125 | For hotfix branches, the `<base>` arg must be a commit on `master`. |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 126 | |
| 127 | * To list/start support branches, use: |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 128 | |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 129 | git flow support |
Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 130 | git flow support start <release> <base> |
| 131 | |
| 132 | For support branches, the `<base>` arg must be a commit on `master`. |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 133 | |
Vincent Driessen | b33ea8a | 2010-08-24 13:58:32 +0200 | [diff] [blame] | 134 | |
| 135 | Showing your appreciation |
| 136 | ========================= |
| 137 | A few people already requested it, so now it's here: a Flattr button. |
| 138 | |
| 139 | Of course, the best way to show your appreciation for the original |
| 140 | [blog post](http://nvie.com/git-model) or the git-flow tool itself remains |
| 141 | contributing to the community. If you'd like to show your appreciation in |
| 142 | another way, however, consider Flattr'ing me: |
| 143 | |
| 144 | [![Flattr this][2]][1] |
| 145 | |
| 146 | [1]: http://flattr.com/thing/53771/git-flow |
| 147 | [2]: http://api.flattr.com/button/button-static-50x60.png |