blob: f2bb8e94ac0592dc45cce80eb4c108caf00622a8 [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 Driessen78c73dc2010-01-21 00:48:44 +01004for Vincent Driessen's [branching model](http://nvie.com/archives/323 "original
5blog post").
6
Vincent Driessenf206ba62010-01-26 12:44:41 +01007
Vincent Driessenc81e7a22010-01-28 00:33:24 +01008> **IMPORTANT NOTE:**
9> In release 0.2, the order of the arguments has changed to provide a logical
10> subcommand hierarchy.
Vincent Driessenf206ba62010-01-26 12:44:41 +010011
12
Vincent Driessen12c4ab42010-01-26 22:11:19 +010013Installing git-flow
14-------------------
Vincent Driessen13c94822010-02-15 20:09:02 +010015After downloading the sources from Github, also fetch the submodules:
16
17 $ git submodule init
18 $ git submodule update
19
20Then, you can install `git-flow`, using:
Vincent Driessenf206ba62010-01-26 12:44:41 +010021
Vincent Driessen12c4ab42010-01-26 22:11:19 +010022 $ sudo make install
Vincent Driessenf206ba62010-01-26 12:44:41 +010023
Vincent Driessendd720be2010-01-27 00:00:09 +010024By default, this will look for the directory where Git is already installed,
25and install the git-flow extension alongside the other Git subcommands. If git
26is not on the system's `PATH`, it tries `/usr/libexec/git-core`. To explicitly
27override this setting in case you have installed Git in another location, use:
Vincent Driessen12c4ab42010-01-26 22:11:19 +010028
Vincent Driessendd720be2010-01-27 00:00:09 +010029 $ sudo make GIT_EXEC_PATH=/your/custom/path install
Vincent Driessen12c4ab42010-01-26 22:11:19 +010030
Vincent Driessendd720be2010-01-27 00:00:09 +010031You rarely need to override this manually, the default 'make install' should do
32fine.
33
34Or simply point your `PATH` environment variable to your git-flow checkout
35directory.
Vincent Driessenf206ba62010-01-26 12:44:41 +010036
37
Vincent Driessen78c73dc2010-01-21 00:48:44 +010038Please help out
39---------------
Vincent Driessenc49c7932010-02-24 01:22:48 +010040This project is still under development. Feedback and suggestions are very
41welcome and I encourage you to use the [Issues
42list](http://github.com/nvie/gitflow/issues) on Github to provide that
Vincent Driessenf206ba62010-01-26 12:44:41 +010043feedback.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010044
45Feel free to fork this repo and to commit your additions.
46
Vincent Driessen78c73dc2010-01-21 00:48:44 +010047
Vincent Driessenc49c7932010-02-24 01:22:48 +010048Typical usage:
49--------------
Vincent Driessen78c73dc2010-01-21 00:48:44 +010050
Vincent Driessenc49c7932010-02-24 01:22:48 +010051### Initialization
52
53To initialize a new repo with the basic branch structure, use:
Vincent Driessen12c4ab42010-01-26 22:11:19 +010054
Vincent Driessenc49c7932010-02-24 01:22:48 +010055 git flow init
Vincent Driessenf9ebb072010-02-22 07:56:04 +010056
Vincent Driessenc49c7932010-02-24 01:22:48 +010057This will then interactively prompt you with some questions on which branches
58you would like to use as development and production branches, and how you
59would like your prefixes be named. You may simply press Return on any of
60those questions to accept the (sane) default suggestions.
61
62
63### Creating feature/release/hotfix/support branches
Vincent Driessen12c4ab42010-01-26 22:11:19 +010064
Vincent Driessenc81e7a22010-01-28 00:33:24 +010065* 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 Driessen010252a2010-02-04 10:31:29 +010071 For feature branches, the `<base>` arg must be a commit on `develop`.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010072
Vincent Driessenc81e7a22010-01-28 00:33:24 +010073* To list/start/finish release branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +010074
Vincent Driessen04839ae2010-01-28 01:07:20 +010075 git flow release
Vincent Driessen010252a2010-02-04 10:31:29 +010076 git flow release start <release> [<base>]
Vincent Driessenc81e7a22010-01-28 00:33:24 +010077 git flow release finish <release>
Vincent Driessen78c73dc2010-01-21 00:48:44 +010078
Vincent Driessen010252a2010-02-04 10:31:29 +010079 For release branches, the `<base>` arg must be a commit on `develop`.
80
Vincent Driessenc81e7a22010-01-28 00:33:24 +010081* To list/start/finish hotfix branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +010082
Vincent Driessen04839ae2010-01-28 01:07:20 +010083 git flow hotfix
Vincent Driessen010252a2010-02-04 10:31:29 +010084 git flow hotfix start <release> [<base>]
Vincent Driessenc81e7a22010-01-28 00:33:24 +010085 git flow hotfix finish <release>
Vincent Driessen010252a2010-02-04 10:31:29 +010086
87 For hotfix branches, the `<base>` arg must be a commit on `master`.
Vincent Driessenc81e7a22010-01-28 00:33:24 +010088
89* To list/start support branches, use:
Vincent Driessen78c73dc2010-01-21 00:48:44 +010090
Vincent Driessenc81e7a22010-01-28 00:33:24 +010091 git flow support
Vincent Driessen010252a2010-02-04 10:31:29 +010092 git flow support start <release> <base>
93
94 For support branches, the `<base>` arg must be a commit on `master`.
Vincent Driessen78c73dc2010-01-21 00:48:44 +010095