Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 199 lines (132 sloc) 7.159 kb
877f5fe @nvie Fix placement.
authored
1 git-flow ![Project status](http://stillmaintained.com/nvie/gitflow.png)
6c2d30b @nvie Structurally replace gitflow by git-flow, as a true git extension.
authored
2 ========
12c4ab4 @nvie Update README file to mention new available features.
authored
3 A collection of Git extensions to provide high-level repository operations
4fc0bc1 @nvie Use a more friendly URL for the original blog post URL.
authored
4 for Vincent Driessen's [branching model](http://nvie.com/git-model "original
78c73dc @nvie Add initial project outline and guidelines.
authored
5 blog post").
6
7
553776f @nvie Move up the "getting started" paragraph. It's the most important one
authored
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
17 * [A short introduction to git-flow](http://vimeo.com/16018419) (by Mark Derricutt)
18 * [On the path with git-flow](http://codesherpas.com/screencasts/on_the_path_gitflow.mov) (by Dave Bock)
19
20
12c4ab4 @nvie Update README file to mention new available features.
authored
21 Installing git-flow
22 -------------------
e26bfbc @agross Adding more detailed installation information for Windows users on Cygwi...
agross authored
23
24 ### Mac OS
25 If you're on a Mac and use [homebrew](http://github.com/mxcl/homebrew), it's simple:
4f0f539 @nvie Added Rick Osborne's super-easy gitflow installer oneliner to the projec...
authored
26
149d154 @nvie Add installation instructions for homebrew and MacPorts.
authored
27 $ brew install git-flow
28
e26bfbc @agross Adding more detailed installation information for Windows users on Cygwi...
agross authored
29 If you're on a Mac and use [MacPorts](http://macports.org/), it's simple:
4f0f539 @nvie Added Rick Osborne's super-easy gitflow installer oneliner to the projec...
authored
30
149d154 @nvie Add installation instructions for homebrew and MacPorts.
authored
31 $ port install git-flow
c213052 @defeated added OSX instructions using curl (because wget isn't available by defau...
defeated authored
32
e26bfbc @agross Adding more detailed installation information for Windows users on Cygwi...
agross authored
33 ### Linux, etc.
149d154 @nvie Add installation instructions for homebrew and MacPorts.
authored
34 Another easy way to install git-flow is using Rick Osborne's excellent git-flow
35 installer, which can be run using the following command:
36
0f74cf4 This patch prevents silent failure of the auto-installer.
raybec authored
37 $ wget --no-check-certificate -q -O - https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | sudo sh
c213052 @defeated added OSX instructions using curl (because wget isn't available by defau...
defeated authored
38
e26bfbc @agross Adding more detailed installation information for Windows users on Cygwi...
agross authored
39 ### Windows
40 #### Using Cygwin
41 For Windows users who wish to use the automated install, it is suggested that you install [Cygwin](http://www.cygwin.com/)
42 first to install tools like `git`, `util-linux` and `wget` (with those three being packages that can be selected
43 during installation). Then simply run this command from a Cygwin shell:
44
6f199b9 @nvie Make Github download URL in README https.
authored
45 $ wget -q -O - https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | sh
e26bfbc @agross Adding more detailed installation information for Windows users on Cygwi...
agross authored
46
47 #### Using msysgit
48 This is much like the manual installation below, but there are additional steps required to install some extra tools that
49 are not distributed with [msysgit](http://code.google.com/p/msysgit/).
50
69f205c @nvie I only just discovered the --recursive flag to git clone.
authored
51 Clone the git-flow sources from Github:
e26bfbc @agross Adding more detailed installation information for Windows users on Cygwi...
agross authored
52
69f205c @nvie I only just discovered the --recursive flag to git clone.
authored
53 $ git clone --recursive git://github.com/nvie/gitflow.git
e26bfbc @agross Adding more detailed installation information for Windows users on Cygwi...
agross authored
54
55 Copy git-flow's relevant files to your msysgit installation directory:
56
57 $ mkdir /usr/local/bin
58 $ cp git-flow* gitflow* /usr/local/bin/
59 $ cp shFlags/src/shflags /usr/local/bin/gitflow-shFlags
60
61 Next up we need to borrow a couple of binaries from [Cygwin](http://www.cygwin.com/). If you don't have Cygwin installed, please
62 install it including the `util-linux` package. Apart from `util-linux`'s dependencies, no other packages are required. When you
63 finished installation, copy the following files using msysgit's _Git Bash_. We assume the Cygwin's default installation path in C:\cygwin.
64
65 $ cd /c/cygwin/
66 $ cp bin/getopt.exe /usr/local/bin/
67 $ cp bin/cyggcc_s-1.dll /usr/local/bin/
68 $ cp bin/cygiconv-2.dll /usr/local/bin/
69 $ cp bin/cygintl-8.dll /usr/local/bin/
70 $ cp bin/cygwin1.dll /usr/local/bin/
ea738ef @jptoto Added installation instructions for Windows users
jptoto authored
71
e26bfbc @agross Adding more detailed installation information for Windows users on Cygwi...
agross authored
72 After copying the files above, you can safely uninstall your Cygwin installation by deleting the C:\cygwin directory.
ea738ef @jptoto Added installation instructions for Windows users
jptoto authored
73
e26bfbc @agross Adding more detailed installation information for Windows users on Cygwi...
agross authored
74 ### Manual installation
69f205c @nvie I only just discovered the --recursive flag to git clone.
authored
75 If you prefer a manual installation, please use the following instructions:
13c9482 @nvie Added instructions to first fetch submodules before installing.
authored
76
69f205c @nvie I only just discovered the --recursive flag to git clone.
authored
77 $ git clone --recursive git://github.com/nvie/gitflow.git
13c9482 @nvie Added instructions to first fetch submodules before installing.
authored
78
79 Then, you can install `git-flow`, using:
78c73dc @nvie Add initial project outline and guidelines.
authored
80
12c4ab4 @nvie Update README file to mention new available features.
authored
81 $ sudo make install
f206ba6 @nvie Update README file to match the 0.1 release status.
authored
82
e0b54c0 @nvie Strip the GIT_EXEC_PATH Makefile parameter. Replaced it by the more Unix...
authored
83 By default, git-flow will be installed in /usr/local. To change the prefix
84 where git-flow will be installed, simply specify it explicitly, using:
12c4ab4 @nvie Update README file to mention new available features.
authored
85
e0b54c0 @nvie Strip the GIT_EXEC_PATH Makefile parameter. Replaced it by the more Unix...
authored
86 $ sudo make prefix=/opt/local install
dd720be @nvie Dynamically collect the true git exec path and only if that can not be f...
authored
87
88 Or simply point your `PATH` environment variable to your git-flow checkout
89 directory.
78c73dc @nvie Add initial project outline and guidelines.
authored
90
b17b898 @nvie Add installation note on how to install getopt.
authored
91 *Installation note:*
92 git-flow depends on the availability of the command line utility `getopt`,
93 which may not be available in your Unix/Linux environment. Please use your
94 favorite package manager to install `getopt`. For Cygwin, install the
47d1b9d @nvie Made a note on the apt-get installer's package name.
authored
95 `util-linux` package to get `getopt`. If you use `apt-get` as your install
96 manager, the package name is `opt`.
b17b898 @nvie Add installation note on how to install getopt.
authored
97
78c73dc @nvie Add initial project outline and guidelines.
authored
98
ec0b854 @nvie Add link to git-flow-completion project.
authored
99 Integration with your shell
100 ---------------------------
25def71 @nvie Mention the ZSH support for git-flow-completion.
authored
101 For those who use the [Bash](http://www.gnu.org/software/bash/) or
102 [ZSH](http://www.zsh.org) shell, please check out the excellent work on the
ec0b854 @nvie Add link to git-flow-completion project.
authored
103 [git-flow-completion](http://github.com/bobthecow/git-flow-completion) project
104 by [bobthecow](http://github.com/bobthecow). It offers tab-completion for all
105 git-flow subcommands and branch names.
106
25def71 @nvie Mention the ZSH support for git-flow-completion.
authored
107 For Windows users, [msysgit](http://code.google.com/p/msysgit/) is a good
108 starting place for installing git.
ac949bf @jptoto Fixed link to Cygwin and msysgit
jptoto authored
109
ec0b854 @nvie Add link to git-flow-completion project.
authored
110
11965b3 @nvie Added two FAQs.
authored
111 FAQ
112 ---
61f2c69 @nvie Fix FAQ link.
authored
113 See the [FAQ](http://github.com/nvie/gitflow/wiki/FAQ) section of the project
114 Wiki.
cb92228 @nvie Add FAQ note for Windows users.
authored
115
11965b3 @nvie Added two FAQs.
authored
116
f206ba6 @nvie Update README file to match the 0.1 release status.
authored
117 Please help out
118 ---------------
c49c793 @nvie Dotted i's and crossed t's in the README file, for release.
authored
119 This project is still under development. Feedback and suggestions are very
120 welcome and I encourage you to use the [Issues
121 list](http://github.com/nvie/gitflow/issues) on Github to provide that
f206ba6 @nvie Update README file to match the 0.1 release status.
authored
122 feedback.
123
d79a0d4 @nvie Added referral link to the AUTHORS file.
authored
124 Feel free to fork this repo and to commit your additions. For a list of all
125 contributors, please see the [AUTHORS](AUTHORS) file.
78c73dc @nvie Add initial project outline and guidelines.
authored
126
1fd5bcf @nvie Added link to Google group.
authored
127 Any questions, tips, or general discussion can be posted to our Google group:
4d8b379 @nvie Make the links manually.
authored
128 [http://groups.google.com/group/gitflow-users](http://groups.google.com/group/gitflow-users)
1fd5bcf @nvie Added link to Google group.
authored
129
78c73dc @nvie Add initial project outline and guidelines.
authored
130
5d1dbe7 @nvie Added (BSD) licensing terms to the project.
authored
131 License terms
132 -------------
133 git-flow is published under the liberal terms of the BSD License, see the
134 [LICENSE](LICENSE) file. Although the BSD License does not require you to share
135 any modifications you make to the source code, you are very much encouraged and
136 invited to contribute back your modifications to the community, preferably
137 in a Github fork, of course.
138
139
c49c793 @nvie Dotted i's and crossed t's in the README file, for release.
authored
140 ### Initialization
78c73dc @nvie Add initial project outline and guidelines.
authored
141
c49c793 @nvie Dotted i's and crossed t's in the README file, for release.
authored
142 To initialize a new repo with the basic branch structure, use:
12c4ab4 @nvie Update README file to mention new available features.
authored
143
c49c793 @nvie Dotted i's and crossed t's in the README file, for release.
authored
144 git flow init
f9ebb07 @nvie Added 'git flow init' to the README file.
authored
145
c49c793 @nvie Dotted i's and crossed t's in the README file, for release.
authored
146 This will then interactively prompt you with some questions on which branches
147 you would like to use as development and production branches, and how you
148 would like your prefixes be named. You may simply press Return on any of
149 those questions to accept the (sane) default suggestions.
150
151
152 ### Creating feature/release/hotfix/support branches
12c4ab4 @nvie Update README file to mention new available features.
authored
153
c81e7a2 @nvie Update the README to reflect the new subcommand structure.
authored
154 * To list/start/finish feature branches, use:
78c73dc @nvie Add initial project outline and guidelines.
authored
155
c81e7a2 @nvie Update the README to reflect the new subcommand structure.
authored
156 git flow feature
157 git flow feature start <name> [<base>]
158 git flow feature finish <name>
78c73dc @nvie Add initial project outline and guidelines.
authored
159
010252a @nvie Added an optional <base> argument to all start subactions.
authored
160 For feature branches, the `<base>` arg must be a commit on `develop`.
c81e7a2 @nvie Update the README to reflect the new subcommand structure.
authored
161
162 * To list/start/finish release branches, use:
78c73dc @nvie Add initial project outline and guidelines.
authored
163
04839ae @nvie Forgot list command for hotfixes.
authored
164 git flow release
010252a @nvie Added an optional <base> argument to all start subactions.
authored
165 git flow release start <release> [<base>]
c81e7a2 @nvie Update the README to reflect the new subcommand structure.
authored
166 git flow release finish <release>
78c73dc @nvie Add initial project outline and guidelines.
authored
167
010252a @nvie Added an optional <base> argument to all start subactions.
authored
168 For release branches, the `<base>` arg must be a commit on `develop`.
169
c81e7a2 @nvie Update the README to reflect the new subcommand structure.
authored
170 * To list/start/finish hotfix branches, use:
78c73dc @nvie Add initial project outline and guidelines.
authored
171
04839ae @nvie Forgot list command for hotfixes.
authored
172 git flow hotfix
010252a @nvie Added an optional <base> argument to all start subactions.
authored
173 git flow hotfix start <release> [<base>]
c81e7a2 @nvie Update the README to reflect the new subcommand structure.
authored
174 git flow hotfix finish <release>
010252a @nvie Added an optional <base> argument to all start subactions.
authored
175
176 For hotfix branches, the `<base>` arg must be a commit on `master`.
c81e7a2 @nvie Update the README to reflect the new subcommand structure.
authored
177
178 * To list/start support branches, use:
78c73dc @nvie Add initial project outline and guidelines.
authored
179
c81e7a2 @nvie Update the README to reflect the new subcommand structure.
authored
180 git flow support
010252a @nvie Added an optional <base> argument to all start subactions.
authored
181 git flow support start <release> <base>
182
183 For support branches, the `<base>` arg must be a commit on `master`.
78c73dc @nvie Add initial project outline and guidelines.
authored
184
b33ea8a @nvie Added a Flattr button to the README file.
authored
185
186 Showing your appreciation
187 =========================
188 A few people already requested it, so now it's here: a Flattr button.
189
190 Of course, the best way to show your appreciation for the original
191 [blog post](http://nvie.com/git-model) or the git-flow tool itself remains
192 contributing to the community. If you'd like to show your appreciation in
193 another way, however, consider Flattr'ing me:
194
195 [![Flattr this][2]][1]
196
197 [1]: http://flattr.com/thing/53771/git-flow
198 [2]: http://api.flattr.com/button/button-static-50x60.png
Something went wrong with that request. Please try again.