2010-01-26 21:18:36 +00:00
|
|
|
git-flow
|
|
|
|
========
|
2010-01-26 21:11:19 +00:00
|
|
|
A collection of Git extensions to provide high-level repository operations
|
2010-02-24 00:43:04 +00:00
|
|
|
for Vincent Driessen's [branching model](http://nvie.com/git-model "original
|
2010-01-20 23:48:44 +00:00
|
|
|
blog post").
|
|
|
|
|
|
|
|
|
2010-01-27 23:33:24 +00:00
|
|
|
> **IMPORTANT NOTE:**
|
|
|
|
> In release 0.2, the order of the arguments has changed to provide a logical
|
|
|
|
> subcommand hierarchy.
|
2010-01-26 11:44:41 +00:00
|
|
|
|
|
|
|
|
2010-01-26 21:11:19 +00:00
|
|
|
Installing git-flow
|
|
|
|
-------------------
|
2010-02-15 19:09:02 +00:00
|
|
|
After downloading the sources from Github, also fetch the submodules:
|
|
|
|
|
|
|
|
$ git submodule init
|
|
|
|
$ git submodule update
|
|
|
|
|
|
|
|
Then, you can install `git-flow`, using:
|
2010-01-20 23:48:44 +00:00
|
|
|
|
2010-01-26 21:11:19 +00:00
|
|
|
$ sudo make install
|
2010-01-26 11:44:41 +00:00
|
|
|
|
2010-01-26 23:00:09 +00:00
|
|
|
By default, this will look for the directory where Git is already installed,
|
|
|
|
and install the git-flow extension alongside the other Git subcommands. If git
|
|
|
|
is not on the system's `PATH`, it tries `/usr/libexec/git-core`. To explicitly
|
|
|
|
override this setting in case you have installed Git in another location, use:
|
2010-01-26 21:11:19 +00:00
|
|
|
|
2010-01-26 23:00:09 +00:00
|
|
|
$ sudo make GIT_EXEC_PATH=/your/custom/path install
|
2010-01-26 21:11:19 +00:00
|
|
|
|
2010-01-26 23:00:09 +00:00
|
|
|
You rarely need to override this manually, the default 'make install' should do
|
|
|
|
fine.
|
|
|
|
|
|
|
|
Or simply point your `PATH` environment variable to your git-flow checkout
|
|
|
|
directory.
|
2010-01-20 23:48:44 +00:00
|
|
|
|
|
|
|
|
2010-01-26 11:44:41 +00:00
|
|
|
Please help out
|
|
|
|
---------------
|
2010-02-24 00:22:48 +00:00
|
|
|
This project is still under development. Feedback and suggestions are very
|
|
|
|
welcome and I encourage you to use the [Issues
|
|
|
|
list](http://github.com/nvie/gitflow/issues) on Github to provide that
|
2010-01-26 11:44:41 +00:00
|
|
|
feedback.
|
|
|
|
|
|
|
|
Feel free to fork this repo and to commit your additions.
|
2010-01-20 23:48:44 +00:00
|
|
|
|
|
|
|
|
2010-02-24 00:22:48 +00:00
|
|
|
Typical usage:
|
|
|
|
--------------
|
|
|
|
|
|
|
|
### Initialization
|
2010-01-20 23:48:44 +00:00
|
|
|
|
2010-02-24 00:22:48 +00:00
|
|
|
To initialize a new repo with the basic branch structure, use:
|
2010-01-26 21:11:19 +00:00
|
|
|
|
2010-02-24 00:22:48 +00:00
|
|
|
git flow init
|
2010-02-22 06:56:04 +00:00
|
|
|
|
2010-02-24 00:22:48 +00:00
|
|
|
This will then interactively prompt you with some questions on which branches
|
|
|
|
you would like to use as development and production branches, and how you
|
|
|
|
would like your prefixes be named. You may simply press Return on any of
|
|
|
|
those questions to accept the (sane) default suggestions.
|
|
|
|
|
|
|
|
|
|
|
|
### Creating feature/release/hotfix/support branches
|
2010-01-26 21:11:19 +00:00
|
|
|
|
2010-01-27 23:33:24 +00:00
|
|
|
* To list/start/finish feature branches, use:
|
2010-01-20 23:48:44 +00:00
|
|
|
|
2010-01-27 23:33:24 +00:00
|
|
|
git flow feature
|
|
|
|
git flow feature start <name> [<base>]
|
|
|
|
git flow feature finish <name>
|
2010-01-20 23:48:44 +00:00
|
|
|
|
2010-02-04 09:31:29 +00:00
|
|
|
For feature branches, the `<base>` arg must be a commit on `develop`.
|
2010-01-27 23:33:24 +00:00
|
|
|
|
|
|
|
* To list/start/finish release branches, use:
|
2010-01-20 23:48:44 +00:00
|
|
|
|
2010-01-28 00:07:20 +00:00
|
|
|
git flow release
|
2010-02-04 09:31:29 +00:00
|
|
|
git flow release start <release> [<base>]
|
2010-01-27 23:33:24 +00:00
|
|
|
git flow release finish <release>
|
2010-01-20 23:48:44 +00:00
|
|
|
|
2010-02-04 09:31:29 +00:00
|
|
|
For release branches, the `<base>` arg must be a commit on `develop`.
|
|
|
|
|
2010-01-27 23:33:24 +00:00
|
|
|
* To list/start/finish hotfix branches, use:
|
2010-01-20 23:48:44 +00:00
|
|
|
|
2010-01-28 00:07:20 +00:00
|
|
|
git flow hotfix
|
2010-02-04 09:31:29 +00:00
|
|
|
git flow hotfix start <release> [<base>]
|
2010-01-27 23:33:24 +00:00
|
|
|
git flow hotfix finish <release>
|
2010-02-04 09:31:29 +00:00
|
|
|
|
|
|
|
For hotfix branches, the `<base>` arg must be a commit on `master`.
|
2010-01-27 23:33:24 +00:00
|
|
|
|
|
|
|
* To list/start support branches, use:
|
2010-01-20 23:48:44 +00:00
|
|
|
|
2010-01-27 23:33:24 +00:00
|
|
|
git flow support
|
2010-02-04 09:31:29 +00:00
|
|
|
git flow support start <release> <base>
|
|
|
|
|
|
|
|
For support branches, the `<base>` arg must be a commit on `master`.
|
2010-01-20 23:48:44 +00:00
|
|
|
|