Vincent Driessen | 6c2d30b | 2010-01-26 22:18:36 +0100 | [diff] [blame] | 1 | git-flow |
| 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 | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 4 | for Vincent Driessen's [branching model](http://nvie.com/archives/323 "original |
| 5 | blog post"). |
| 6 | |
Vincent Driessen | f206ba6 | 2010-01-26 12:44:41 +0100 | [diff] [blame] | 7 | |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 8 | > **IMPORTANT NOTE:** |
| 9 | > In release 0.2, the order of the arguments has changed to provide a logical |
| 10 | > subcommand hierarchy. |
Vincent Driessen | f206ba6 | 2010-01-26 12:44:41 +0100 | [diff] [blame] | 11 | |
| 12 | |
Vincent Driessen | 12c4ab4 | 2010-01-26 22:11:19 +0100 | [diff] [blame] | 13 | Installing git-flow |
| 14 | ------------------- |
Vincent Driessen | 13c9482 | 2010-02-15 20:09:02 +0100 | [diff] [blame] | 15 | After downloading the sources from Github, also fetch the submodules: |
| 16 | |
| 17 | $ git submodule init |
| 18 | $ git submodule update |
| 19 | |
| 20 | Then, you can install `git-flow`, using: |
Vincent Driessen | f206ba6 | 2010-01-26 12:44:41 +0100 | [diff] [blame] | 21 | |
Vincent Driessen | 12c4ab4 | 2010-01-26 22:11:19 +0100 | [diff] [blame] | 22 | $ sudo make install |
Vincent Driessen | f206ba6 | 2010-01-26 12:44:41 +0100 | [diff] [blame] | 23 | |
Vincent Driessen | dd720be | 2010-01-27 00:00:09 +0100 | [diff] [blame] | 24 | By default, this will look for the directory where Git is already installed, |
| 25 | and install the git-flow extension alongside the other Git subcommands. If git |
| 26 | is not on the system's `PATH`, it tries `/usr/libexec/git-core`. To explicitly |
| 27 | override this setting in case you have installed Git in another location, use: |
Vincent Driessen | 12c4ab4 | 2010-01-26 22:11:19 +0100 | [diff] [blame] | 28 | |
Vincent Driessen | dd720be | 2010-01-27 00:00:09 +0100 | [diff] [blame] | 29 | $ sudo make GIT_EXEC_PATH=/your/custom/path install |
Vincent Driessen | 12c4ab4 | 2010-01-26 22:11:19 +0100 | [diff] [blame] | 30 | |
Vincent Driessen | dd720be | 2010-01-27 00:00:09 +0100 | [diff] [blame] | 31 | You rarely need to override this manually, the default 'make install' should do |
| 32 | fine. |
| 33 | |
| 34 | Or simply point your `PATH` environment variable to your git-flow checkout |
| 35 | directory. |
Vincent Driessen | f206ba6 | 2010-01-26 12:44:41 +0100 | [diff] [blame] | 36 | |
| 37 | |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 38 | Please help out |
| 39 | --------------- |
Vincent Driessen | c49c793 | 2010-02-24 01:22:48 +0100 | [diff] [blame] | 40 | This project is still under development. Feedback and suggestions are very |
| 41 | welcome and I encourage you to use the [Issues |
| 42 | list](http://github.com/nvie/gitflow/issues) on Github to provide that |
Vincent Driessen | f206ba6 | 2010-01-26 12:44:41 +0100 | [diff] [blame] | 43 | feedback. |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 44 | |
| 45 | Feel free to fork this repo and to commit your additions. |
| 46 | |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 47 | |
Vincent Driessen | c49c793 | 2010-02-24 01:22:48 +0100 | [diff] [blame] | 48 | Typical usage: |
| 49 | -------------- |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 50 | |
Vincent Driessen | c49c793 | 2010-02-24 01:22:48 +0100 | [diff] [blame] | 51 | ### Initialization |
| 52 | |
| 53 | To initialize a new repo with the basic branch structure, use: |
Vincent Driessen | 12c4ab4 | 2010-01-26 22:11:19 +0100 | [diff] [blame] | 54 | |
Vincent Driessen | c49c793 | 2010-02-24 01:22:48 +0100 | [diff] [blame] | 55 | git flow init |
Vincent Driessen | f9ebb07 | 2010-02-22 07:56:04 +0100 | [diff] [blame] | 56 | |
Vincent Driessen | c49c793 | 2010-02-24 01:22:48 +0100 | [diff] [blame] | 57 | This will then interactively prompt you with some questions on which branches |
| 58 | you would like to use as development and production branches, and how you |
| 59 | would like your prefixes be named. You may simply press Return on any of |
| 60 | those questions to accept the (sane) default suggestions. |
| 61 | |
| 62 | |
| 63 | ### Creating feature/release/hotfix/support branches |
Vincent Driessen | 12c4ab4 | 2010-01-26 22:11:19 +0100 | [diff] [blame] | 64 | |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 65 | * To list/start/finish feature branches, use: |
| 66 | |
| 67 | git flow feature |
| 68 | git flow feature start <name> [<base>] |
| 69 | git flow feature finish <name> |
| 70 | |
Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 71 | For feature branches, the `<base>` arg must be a commit on `develop`. |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 72 | |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 73 | * To list/start/finish release branches, use: |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 74 | |
Vincent Driessen | 04839ae | 2010-01-28 01:07:20 +0100 | [diff] [blame] | 75 | git flow release |
Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 76 | git flow release start <release> [<base>] |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 77 | git flow release finish <release> |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 78 | |
Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 79 | For release branches, the `<base>` arg must be a commit on `develop`. |
| 80 | |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 81 | * To list/start/finish hotfix branches, use: |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 82 | |
Vincent Driessen | 04839ae | 2010-01-28 01:07:20 +0100 | [diff] [blame] | 83 | git flow hotfix |
Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 84 | git flow hotfix start <release> [<base>] |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 85 | git flow hotfix finish <release> |
Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 86 | |
| 87 | For hotfix branches, the `<base>` arg must be a commit on `master`. |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 88 | |
| 89 | * To list/start support branches, use: |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 90 | |
Vincent Driessen | c81e7a2 | 2010-01-28 00:33:24 +0100 | [diff] [blame] | 91 | git flow support |
Vincent Driessen | 010252a | 2010-02-04 10:31:29 +0100 | [diff] [blame] | 92 | git flow support start <release> <base> |
| 93 | |
| 94 | For support branches, the `<base>` arg must be a commit on `master`. |
Vincent Driessen | 78c73dc | 2010-01-21 00:48:44 +0100 | [diff] [blame] | 95 | |