From 1b454cc0cfca72e8d67882fa46f56d8d6d611603 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 25 Aug 2011 09:24:55 +0200 Subject: [PATCH 01/51] Replace contrib/debian/ with a note on how to install on Debian. Since gitflow is packaged for Debian and is available for testing and sid already, remove the contrib/ directory in favour of using the official Debian package. Also mention how to install gitflow on Debian in the README.mdown. Furthermore, Debian-specific things were removed from Changes.mdown and the Makefile. Signed-off-by: Gergely Nagy --- Changes.mdown | 2 +- Makefile | 7 +------ README.mdown | 10 ++++++++++ contrib/debian/changelog | 5 ----- contrib/debian/compat | 1 - contrib/debian/control | 14 -------------- contrib/debian/copyright | 40 ---------------------------------------- contrib/debian/docs | 1 - contrib/debian/rules | 16 ---------------- 9 files changed, 12 insertions(+), 84 deletions(-) delete mode 100644 contrib/debian/changelog delete mode 100644 contrib/debian/compat delete mode 100644 contrib/debian/control delete mode 100644 contrib/debian/copyright delete mode 100644 contrib/debian/docs delete mode 100755 contrib/debian/rules diff --git a/Changes.mdown b/Changes.mdown index 53858b6b1..f38f90b00 100644 --- a/Changes.mdown +++ b/Changes.mdown @@ -7,7 +7,7 @@ Release date: **not yet** * Various minor bug fixes related to internal argument passing -* Add package installers for the Debian and Windows platforms. +* Add package installers for the Windows platform. 0.4.1: ----- diff --git a/Makefile b/Makefile index 764bd23b0..fbbfd2c00 100644 --- a/Makefile +++ b/Makefile @@ -27,12 +27,7 @@ # policies, either expressed or implied, of Vincent Driessen. # -# Determine if we're inside a debian build .. -ifdef DEB_BUILD_ARCH - prefix=$(DESTDIR)/usr/ -else - prefix=/usr/local -endif +prefix=/usr/local # files that need mode 755 EXEC_FILES=git-flow diff --git a/README.mdown b/README.mdown index b3e1df31b..aa9a6a25f 100644 --- a/README.mdown +++ b/README.mdown @@ -36,6 +36,16 @@ installer, which can be run using the following command: $ wget --no-check-certificate -q -O - https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | sudo bash +#### Debian + +Users of Debian testing and unstable can use the apt-get tool to +install gitflow from the Debian repository: + + $ apt-get install git-flow + +For Debian stable, one can either use the git flow installer, or the +Debian package from unstable (it works just fine on stable too). + ### Windows For Windows users, [msysgit](http://code.google.com/p/msysgit/) is a good diff --git a/contrib/debian/changelog b/contrib/debian/changelog deleted file mode 100644 index f8895965e..000000000 --- a/contrib/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -gitflow (0.4.1) unstable; urgency=low - - * Initial Debian Packaging - - -- Kiall Mac Innes Mon, 25 Apr 2011 23:51:42 +0100 diff --git a/contrib/debian/compat b/contrib/debian/compat deleted file mode 100644 index 7f8f011eb..000000000 --- a/contrib/debian/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/contrib/debian/control b/contrib/debian/control deleted file mode 100644 index d47b2b03d..000000000 --- a/contrib/debian/control +++ /dev/null @@ -1,14 +0,0 @@ -Source: gitflow -Section: vcs -Priority: optional -Maintainer: Kiall Mac Innes -Build-Depends: debhelper (>= 7.0.50~), git -Standards-Version: 3.9.1 -Homepage: http://nvie.com/posts/a-successful-git-branching-model/ -Vcs-Git: https://github.com/nvie/gitflow.git -Vcs-Browser: https://github.com/nvie/gitflow - -Package: gitflow -Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, git -Description: Git extensions to provide high-level repository operations for Vincent Driessen's branching model diff --git a/contrib/debian/copyright b/contrib/debian/copyright deleted file mode 100644 index a08359acb..000000000 --- a/contrib/debian/copyright +++ /dev/null @@ -1,40 +0,0 @@ -Format: http://dep.debian.net/deps/dep5 -Upstream-Name: gitflow -Source: - -Files: * -Copyright: - -License: BSD-3-Clause - -Files: debian/* -Copyright: 2011 Kiall -License: BSD-3-Clause - -License: BSD-3-Clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. diff --git a/contrib/debian/docs b/contrib/debian/docs deleted file mode 100644 index ceda507c1..000000000 --- a/contrib/debian/docs +++ /dev/null @@ -1 +0,0 @@ -README.mdown diff --git a/contrib/debian/rules b/contrib/debian/rules deleted file mode 100755 index 79092d6be..000000000 --- a/contrib/debian/rules +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -override_dh_testdir: - dh_testdir - git submodule init && git submodule update -%: - dh $@ From 05c4dbc8a8a8a1a78de12ee0b6ea1d3710fb05bf Mon Sep 17 00:00:00 2001 From: Randy Merrill Date: Thu, 13 Oct 2011 20:28:10 -0700 Subject: [PATCH 02/51] Adding the `eval` to force variable expansion. Closes #50 --- git-flow-release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-flow-release b/git-flow-release index 08f595b2f..bb39d5276 100644 --- a/git-flow-release +++ b/git-flow-release @@ -239,7 +239,7 @@ cmd_finish() { flag sign && opts="$opts -s" [ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" - git tag $opts "$tagname" || \ + eval git tag $opts "$tagname" || \ die "Tagging failed. Please run finish again to retry." fi fi From d0df88da6968c39e5c0422a5634060f559081d26 Mon Sep 17 00:00:00 2001 From: Randy Merrill Date: Thu, 13 Oct 2011 21:09:26 -0700 Subject: [PATCH 03/51] Adding the variable expansion to the hotfix. --- git-flow-hotfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-flow-hotfix b/git-flow-hotfix index 261811317..5c079078c 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -241,7 +241,7 @@ cmd_finish() { flag sign && opts="$opts -s" [ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" - git tag $opts "$VERSION_PREFIX$VERSION" || \ + eval git tag $opts "$VERSION_PREFIX$VERSION" || \ die "Tagging failed. Please run finish again to retry." fi fi From 9c5c806cf97cc44db39d4536358ad1288294023c Mon Sep 17 00:00:00 2001 From: Chad Walker Date: Tue, 25 Oct 2011 15:42:32 -0700 Subject: [PATCH 04/51] added a -D flag to the git flow finish command to try extra hard to delete the local branch after finishing the feature --- git-flow-feature | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/git-flow-feature b/git-flow-feature index 9da4b0bfa..48fb74d43 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -44,7 +44,7 @@ PREFIX=$(git config --get gitflow.prefix.feature) usage() { echo "usage: git flow feature [list] [-v]" echo " git flow feature start [-F] []" - echo " git flow feature finish [-rFk] []" + echo " git flow feature finish [-rFkD] []" echo " git flow feature publish " echo " git flow feature track " echo " git flow feature diff []" @@ -231,6 +231,7 @@ cmd_finish() { DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F DEFINE_boolean rebase false "rebase instead of merge" r DEFINE_boolean keep false "keep branch after performing finish" k + DEFINE_boolean hard_delete false "try extra hard to delete the branch after performing finish" D parse_args "$@" expand_nameprefix_arg_or_current @@ -346,7 +347,11 @@ helper_finish_cleanup() { if noflag keep; then - git branch -d "$BRANCH" + if flag hard_delete; then + git branch -D "$BRANCH" + else + git branch -d "$BRANCH" + fi fi echo From 0b324def488f2e73e0db6109e440974f3aab265f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Schr=C3=B6der?= Date: Sat, 12 Nov 2011 17:36:36 +0100 Subject: [PATCH 05/51] add publishing to hotfix --- git-flow-hotfix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/git-flow-hotfix b/git-flow-hotfix index 261811317..0a7727261 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -46,6 +46,7 @@ usage() { echo "usage: git flow hotfix [list] [-v]" echo " git flow hotfix start [-F] []" echo " git flow hotfix finish [-Fsumpk] " + echo " git flow hotfix publish " } cmd_default() { @@ -188,6 +189,33 @@ cmd_start() { echo } +cmd_publish() { + parse_args "$@" + require_version_arg + + # sanity checks + require_clean_working_tree + require_branch "$BRANCH" + git fetch -q "$ORIGIN" + require_branch_absent "$ORIGIN/$BRANCH" + + # create remote branch + git push "$ORIGIN" "$BRANCH:refs/heads/$BRANCH" + git fetch -q "$ORIGIN" + + # configure remote tracking + git config "branch.$BRANCH.remote" "$ORIGIN" + git config "branch.$BRANCH.merge" "refs/heads/$BRANCH" + git checkout "$BRANCH" + + echo + echo "Summary of actions:" + echo "- A new remote branch '$BRANCH' was created" + echo "- The local branch '$BRANCH' was configured to track the remote branch" + echo "- You are now on branch '$BRANCH'" + echo +} + cmd_finish() { DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F DEFINE_boolean sign false "sign the release tag cryptographically" s From 4895c15e440b85ab8b53c4ff9cd4e715211f778d Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Wed, 23 Nov 2011 20:36:16 +0100 Subject: [PATCH 06/51] Fix wording. --- git-flow-feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-flow-feature b/git-flow-feature index 48fb74d43..726b4aed5 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -231,7 +231,7 @@ cmd_finish() { DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F DEFINE_boolean rebase false "rebase instead of merge" r DEFINE_boolean keep false "keep branch after performing finish" k - DEFINE_boolean hard_delete false "try extra hard to delete the branch after performing finish" D + DEFINE_boolean force_delete false "force delete feature branch after finish" D parse_args "$@" expand_nameprefix_arg_or_current @@ -347,7 +347,7 @@ helper_finish_cleanup() { if noflag keep; then - if flag hard_delete; then + if flag force_delete; then git branch -D "$BRANCH" else git branch -d "$BRANCH" From 766159d3039bd4f693c15bbb57c7d748e88b6c2c Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Thu, 24 Nov 2011 13:02:00 +0100 Subject: [PATCH 07/51] Add a cool new video tutorial on git-flow by Build a Module. --- README.mdown | 1 + 1 file changed, 1 insertion(+) diff --git a/README.mdown b/README.mdown index b3e1df31b..f8d48b316 100644 --- a/README.mdown +++ b/README.mdown @@ -14,6 +14,7 @@ Kreeftmeijer's blog post: Or have a look at one of these screen casts: +* [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) * [A short introduction to git-flow](http://vimeo.com/16018419) (by Mark Derricutt) * [On the path with git-flow](http://codesherpas.com/screencasts/on_the_path_gitflow.mov) (by Dave Bock) From 62c339eba9441dc519f83daa2ce96c243ae89730 Mon Sep 17 00:00:00 2001 From: Emre Berge Ergenekon Date: Sun, 27 Nov 2011 22:07:57 -0800 Subject: [PATCH 08/51] develop_branch uses origin/develop_branch as start-point if one exists. By default a local develop branch is created of from master regardless if a origin/develop exits. This problem is discussed in issues #137 and #23. --- git-flow-init | 6 +++++- gitflow-common | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/git-flow-init b/git-flow-init index 57ab2441e..d19b65134 100644 --- a/git-flow-init +++ b/git-flow-init @@ -200,7 +200,11 @@ cmd_default() { # default production branch and develop was "created". We should create # the develop branch now in that case (we base it on master, of course) if ! git_local_branch_exists "$develop_branch"; then - git branch --no-track "$develop_branch" "$master_branch" + if git_remote_branch_exists "origin/$develop_branch"; then + git branch "$develop_branch" "origin/$develop_branch" >/dev/null 2>&1 + else + git branch --no-track "$develop_branch" "$master_branch" + fi created_gitflow_branch=1 fi diff --git a/gitflow-common b/gitflow-common index 252f5d0ea..fb515de83 100644 --- a/gitflow-common +++ b/gitflow-common @@ -97,6 +97,10 @@ git_local_branch_exists() { has $1 $(git_local_branches) } +git_remote_branch_exists() { + has $1 $(git_remote_branches) +} + git_branch_exists() { has $1 $(git_all_branches) } From 0d00b698f2567737137fcac464d146a78ee7af0c Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 28 Nov 2011 09:43:57 +0100 Subject: [PATCH 09/51] Add Changelog note and added Emre to list of contributors. --- AUTHORS | 1 + Changes.mdown | 3 +++ 2 files changed, 4 insertions(+) diff --git a/AUTHORS b/AUTHORS index d4e7490e4..3541d3bda 100644 --- a/AUTHORS +++ b/AUTHORS @@ -16,5 +16,6 @@ Authors are (ordered by first commit date): - Kiall Mac Innes - Jon Bernard - Olivier Mengué +- Emre Berge Ergenekon Portions derived from other open source works are clearly marked. diff --git a/Changes.mdown b/Changes.mdown index 53858b6b1..71c49450d 100644 --- a/Changes.mdown +++ b/Changes.mdown @@ -2,6 +2,9 @@ ----- Release date: **not yet** +* `git flow init` now detects situations where origin already has gitflow + branches set up, and behaves accordingly (thanks Emre Berge Ergenekon) + * `git flow feature finish` can now be called without a feature branch name(prefix) argument and will finish the current branch, if on any. From baf163e07d579bec3dd0e21d00297832e8848b8b Mon Sep 17 00:00:00 2001 From: "Eric J. Holmes" Date: Mon, 28 Nov 2011 23:28:47 -0800 Subject: [PATCH 10/51] Check if a remote master branch exists before die, track it if no local master branch exists --- git-flow-init | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/git-flow-init b/git-flow-init index d19b65134..4afa1c25e 100644 --- a/git-flow-init +++ b/git-flow-init @@ -117,8 +117,14 @@ cmd_default() { # check existence in case of an already existing repo if [ "$should_check_existence" = "YES" ]; then - git_local_branch_exists "$master_branch" || \ + # if no local branch exists and a remote branch of the same + # name exists, checkout that branch and use it for master + if ! git_local_branch_exists "$master_branch" && \ + git_remote_branch_exists "origin/$master_branch"; then + git branch "$master_branch" "origin/$master_branch" >/dev/null 2>&1 + elif ! git_local_branch_exists "$master_branch"; then die "Local branch '$master_branch' does not exist." + fi fi # store the name of the master branch From 938ea5f07485118efbf5da60239af73f4f9308a7 Mon Sep 17 00:00:00 2001 From: Eric Holmes Date: Tue, 29 Nov 2011 00:14:30 -0800 Subject: [PATCH 11/51] Add information for contributing. --- README.mdown | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.mdown b/README.mdown index f8d48b316..4dfa33513 100644 --- a/README.mdown +++ b/README.mdown @@ -116,6 +116,16 @@ contributors, please see the [AUTHORS](AUTHORS) file. Any questions, tips, or general discussion can be posted to our Google group: [http://groups.google.com/group/gitflow-users](http://groups.google.com/group/gitflow-users) +Contributing +------------ +* Fork the repository. +* `git clone git@github.com:/gitflow.git` +* `git branch master origin/master` +* `git flow init -d` +* `git flow feature start ` +* Do work and commit your changes. (**hint**: ``export PATH=`pwd`:$PATH`` from within the gitflow directory helps) +* `git flow feature publish ` +* Open a pull request to your feature branch. License terms ------------- From ba0cc8a70f5ab58089b751d1140809f2e28099e9 Mon Sep 17 00:00:00 2001 From: Eric Holmes Date: Tue, 29 Nov 2011 00:23:15 -0800 Subject: [PATCH 12/51] Add --recursive. --- README.mdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.mdown b/README.mdown index 4dfa33513..3d277ff46 100644 --- a/README.mdown +++ b/README.mdown @@ -119,7 +119,7 @@ Any questions, tips, or general discussion can be posted to our Google group: Contributing ------------ * Fork the repository. -* `git clone git@github.com:/gitflow.git` +* `git clone --recursive git@github.com:/gitflow.git` * `git branch master origin/master` * `git flow init -d` * `git flow feature start ` From 921ddf56e293584309753d2246d045bb1c91671c Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Tue, 29 Nov 2011 11:31:18 +0100 Subject: [PATCH 13/51] Add Eric Holmes to list of contributors. --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 3541d3bda..1c297540b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -17,5 +17,6 @@ Authors are (ordered by first commit date): - Jon Bernard - Olivier Mengué - Emre Berge Ergenekon +- Eric Holmes Portions derived from other open source works are clearly marked. From 49305ec93d8c1bdf897df8a8e9ccee92f0d3d23d Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Wed, 30 Nov 2011 22:14:40 +0100 Subject: [PATCH 14/51] Rewrote Eric's text a bit. --- README.mdown | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/README.mdown b/README.mdown index 3d277ff46..eb619be28 100644 --- a/README.mdown +++ b/README.mdown @@ -118,14 +118,21 @@ Any questions, tips, or general discussion can be posted to our Google group: Contributing ------------ -* Fork the repository. -* `git clone --recursive git@github.com:/gitflow.git` -* `git branch master origin/master` -* `git flow init -d` -* `git flow feature start ` -* Do work and commit your changes. (**hint**: ``export PATH=`pwd`:$PATH`` from within the gitflow directory helps) -* `git flow feature publish ` -* Open a pull request to your feature branch. +Fork the repository. Then, run: + + git clone --recursive git@github.com:/gitflow.git + cd gitflow + git branch master origin/master + git flow init -d + git flow feature start + +Then, do work and commit your changes. **Hint**: ``export PATH=`pwd`:$PATH`` +from within the gitflow directory makes sure you're using the version of +gitflow you're currently developing. + + git flow feature publish + +When done, open a pull request to your feature branch. License terms ------------- From 4b9545e5822d3dee65a673e81b80328df7bb151e Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Wed, 30 Nov 2011 22:52:20 +0100 Subject: [PATCH 15/51] Add a proposal for our Windows users. Will this help you guys out? --- git-flow | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/git-flow b/git-flow index 97b1b34bb..004aa2eee 100755 --- a/git-flow +++ b/git-flow @@ -42,7 +42,9 @@ if [ "$DEBUG" = "yes" ]; then set -x fi -export GITFLOW_DIR=$(dirname "$0") +# The sed expression here replaces all backslashes by forward slashes. +# This helps our Windows users, while not bothering our Unix users. +export GITFLOW_DIR=$(dirname $(echo "$0" | sed -e 's,\\,/,g')) usage() { echo "usage: git flow " From 5e8cc9fceb509848dee2cd62e98aadc29ffa146b Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Thu, 1 Dec 2011 08:52:33 +0100 Subject: [PATCH 16/51] Oops, forgot about spaces in the dirname. Quite likely for Windows users to hit this problem. --- git-flow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-flow b/git-flow index 004aa2eee..a03ba1fd3 100755 --- a/git-flow +++ b/git-flow @@ -44,7 +44,7 @@ fi # The sed expression here replaces all backslashes by forward slashes. # This helps our Windows users, while not bothering our Unix users. -export GITFLOW_DIR=$(dirname $(echo "$0" | sed -e 's,\\,/,g')) +export GITFLOW_DIR=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") usage() { echo "usage: git flow " From 083a588d4fba8ea4a5a0f6b529cb47c9f0be47e0 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Thu, 1 Dec 2011 08:56:59 +0100 Subject: [PATCH 17/51] Better support for the Windows platform, where backslashes are dominant. --- Changes.mdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changes.mdown b/Changes.mdown index 71c49450d..4e3936971 100644 --- a/Changes.mdown +++ b/Changes.mdown @@ -10,6 +10,8 @@ Release date: **not yet** * Various minor bug fixes related to internal argument passing +* Better support for Windows users. + * Add package installers for the Debian and Windows platforms. 0.4.1: From e856e0a528daaf212f1b74696f6ef730beed856f Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Tue, 6 Dec 2011 08:46:01 +0100 Subject: [PATCH 18/51] fixed the installer in msysgit environment to work with windows XP as the command 'choice' is not available on Windows XP we have to work around this issue by usage of 'set /p' --- contrib/msysgit-install.cmd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/msysgit-install.cmd b/contrib/msysgit-install.cmd index 12858397d..5f005bfa7 100644 --- a/contrib/msysgit-install.cmd +++ b/contrib/msysgit-install.cmd @@ -22,11 +22,11 @@ echo getopt.exe... Found if not exist "%GIT_HOME%\bin\git-flow" goto :Install echo GitFlow is already installed.>&2 -choice /C YN /M "Do you want to replace it" -if errorlevel 255 goto :Abort -if errorlevel 2 goto :Abort -if not errorlevel 1 goto :Abort +set /p mychoice="Do you want to replace it [y/n]" +if "%mychoice%"=="y" goto :DeleteOldFiles +goto :Abort +:DeleteOldFiles echo Deleting old files... for /F %%i in ("%GIT_HOME%\git-flow*" "%GIT_HOME%\gitflow-*") do if exist "%%~fi" del /F /Q "%%~fi" From c02c12dd760be6b405bcbcb45e0f71450d9a7d9e Mon Sep 17 00:00:00 2001 From: Alexander Zeitler Date: Tue, 6 Dec 2011 21:38:04 +0100 Subject: [PATCH 19/51] Updated Cygwin section with possibly missing package. --- README.mdown | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.mdown b/README.mdown index eb619be28..5bab435ae 100644 --- a/README.mdown +++ b/README.mdown @@ -49,6 +49,13 @@ during installation). Then simply run this command from a Cygwin shell: $ wget -q -O - https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | bash +If you get the error "flags: FATAL unable to determine getopt version" error after + + $ git flow init + +you need to install the util-linux package using the Cygwin setup. + + #### Using [msysgit](http://code.google.com/p/msysgit/) Download and install `getopt.exe` from the [util-linux package](http://gnuwin32.sourceforge.net/packages/util-linux-ng.htm) into `C:\Program Files\Git\bin`. (Only `getopt.exe`, the others util-linux files are not used). Also install `libintl3.dll` from the Dependencies package, into the same directory. From 07dacd5212c98c2e12f583a2acfb365eeb784f8b Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Tue, 6 Dec 2011 22:12:54 +0100 Subject: [PATCH 20/51] Moved all installation instructions to the Wiki. There were becoming so large they were muddling the README. --- README.mdown | 73 +--------------------------------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/README.mdown b/README.mdown index 5bab435ae..70d944d99 100644 --- a/README.mdown +++ b/README.mdown @@ -21,78 +21,7 @@ Or have a look at one of these screen casts: Installing git-flow ------------------- - -### Mac OS -If you're on a Mac and use [homebrew](http://github.com/mxcl/homebrew), it's simple: - - $ brew install git-flow - -If you're on a Mac and use [MacPorts](http://macports.org/), it's simple: - - $ port install git-flow - -### Linux, etc. -Another easy way to install git-flow is using Rick Osborne's excellent git-flow -installer, which can be run using the following command: - - $ wget --no-check-certificate -q -O - https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | sudo bash - -### Windows - -For Windows users, [msysgit](http://code.google.com/p/msysgit/) is a good -starting place for installing git. - -#### Using Cygwin -For Windows users who wish to use the automated install, it is suggested that you install [Cygwin](http://www.cygwin.com/) -first to install tools like `git`, `util-linux` and `wget` (with those three being packages that can be selected -during installation). Then simply run this command from a Cygwin shell: - - $ wget -q -O - https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | bash - -If you get the error "flags: FATAL unable to determine getopt version" error after - - $ git flow init - -you need to install the util-linux package using the Cygwin setup. - - -#### Using [msysgit](http://code.google.com/p/msysgit/) -Download and install `getopt.exe` from the [util-linux package](http://gnuwin32.sourceforge.net/packages/util-linux-ng.htm) into `C:\Program Files\Git\bin`. (Only `getopt.exe`, the others util-linux files are not used). Also install `libintl3.dll` from the Dependencies package, into the same directory. - -Clone the git-flow sources from GitHub: - - $ git clone --recursive git://github.com/nvie/gitflow.git - $ cd gitflow - -Run the `msysgit-install` script from a command-line prompt (you may have to -run it with "Full Administrator" rights if you installed msysgit with its -installer): - - C:\gitflow> contrib\msysgit-install.cmd - -### Manual installation -If you prefer a manual installation, please use the following instructions: - - $ git clone --recursive git://github.com/nvie/gitflow.git - -Then, you can install `git-flow`, using: - - $ sudo make install - -By default, git-flow will be installed in /usr/local. To change the prefix -where git-flow will be installed, simply specify it explicitly, using: - - $ sudo make prefix=/opt/local install - -Or simply point your `PATH` environment variable to your git-flow checkout -directory. - -*Installation note:* -git-flow depends on the availability of the command line utility `getopt`, -which may not be available in your Unix/Linux environment. Please use your -favorite package manager to install `getopt`. For Cygwin, install the -`util-linux` package to get `getopt`. If you use `apt-get` as your install -manager, the package name is `opt`. +See the Wiki for up-to-date [Installation Instructions](https://github.com/nvie/gitflow/wiki/Installation). Integration with your shell From 5a586336158de625ed9bc9541465b5643f9805d5 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Tue, 20 Dec 2011 10:17:54 -0500 Subject: [PATCH 21/51] Documented init -d flag and publish/pull Documented the -d flag for init command Added docs for feature push and feature pull --- README.mdown | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.mdown b/README.mdown index 70d944d99..dc4e1046f 100644 --- a/README.mdown +++ b/README.mdown @@ -83,13 +83,15 @@ in a Github fork, of course. To initialize a new repo with the basic branch structure, use: - git flow init + git flow init [-d] 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. +The ``-d`` flag will accept all defaults. + ### Creating feature/release/hotfix/support branches @@ -101,6 +103,11 @@ those questions to accept the (sane) default suggestions. For feature branches, the `` arg must be a commit on `develop`. +* To push/pull a feature branch to the remote repository, use: + + git flow feature publish + git flow feature pull + * To list/start/finish release branches, use: git flow release From 905cfb1e38e39e12eb9070f94914bcb8d9506e00 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Tue, 20 Dec 2011 10:21:46 -0500 Subject: [PATCH 22/51] whitespace --- README.mdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.mdown b/README.mdown index dc4e1046f..45b896543 100644 --- a/README.mdown +++ b/README.mdown @@ -106,7 +106,7 @@ The ``-d`` flag will accept all defaults. * To push/pull a feature branch to the remote repository, use: git flow feature publish - git flow feature pull + git flow feature pull * To list/start/finish release branches, use: From 6158d5163fc032632d942dd7520090e5d82e498d Mon Sep 17 00:00:00 2001 From: Vedang Manerikar Date: Mon, 30 Jan 2012 18:38:46 +0530 Subject: [PATCH 23/51] Added a -r flag to git-flow-feature-pull to support pull with rebase --- git-flow-feature | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/git-flow-feature b/git-flow-feature index 726b4aed5..d653ec11f 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -50,7 +50,7 @@ usage() { echo " git flow feature diff []" echo " git flow feature rebase [-i] []" echo " git flow feature checkout []" - echo " git flow feature pull []" + echo " git flow feature pull [-r] []" } cmd_default() { @@ -475,6 +475,7 @@ avoid_accidental_cross_branch_action() { cmd_pull() { #DEFINE_string prefix false 'alternative remote feature branch name prefix' p + DEFINE_boolean rebase false "pull with rebase" r parse_remote_name "$@" if [ -z "$REMOTE" ]; then @@ -500,7 +501,15 @@ cmd_pull() { # we already have a local branch called like this, so simply pull the # remote changes in - git pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." + if flag rebase; then + if ! git pull --rebase -q "$REMOTE" "$BRANCH"; then + warn "Pull was aborted. There might be conflicts during rebase or '$REMOTE' might be inaccessible." + exit 1 + fi + else + git pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." + fi + echo "Pulled $REMOTE's changes into $BRANCH." else # setup the local branch clone for the first time From 3b86dd34ca400d039ef1d7a1b07f30ad3ad6cb83 Mon Sep 17 00:00:00 2001 From: Vedang Manerikar Date: Mon, 30 Jan 2012 19:26:38 +0530 Subject: [PATCH 24/51] install from my github repo --- contrib/gitflow-installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/gitflow-installer.sh b/contrib/gitflow-installer.sh index 0e92ffcef..68dcec018 100644 --- a/contrib/gitflow-installer.sh +++ b/contrib/gitflow-installer.sh @@ -17,7 +17,7 @@ if [ -z "$REPO_NAME" ] ; then fi if [ -z "$REPO_HOME" ] ; then - REPO_HOME="http://github.com/nvie/gitflow.git" + REPO_HOME="http://github.com/vedang/gitflow.git" fi EXEC_FILES="git-flow" From afbf92c6208184f78b4209cd75679d6e25db70c9 Mon Sep 17 00:00:00 2001 From: Randy Merrill Date: Wed, 8 Feb 2012 09:33:04 -0800 Subject: [PATCH 25/51] Updating the escape characters to fix an issue with having a + in the branch name. Since git allows for it the escape should not escape it since it then won't match the branch names correctly. --- gitflow-common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitflow-common b/gitflow-common index fb515de83..4834cf102 100644 --- a/gitflow-common +++ b/gitflow-common @@ -45,7 +45,7 @@ warn() { echo "$@" >&2; } die() { warn "$@"; exit 1; } escape() { - echo "$1" | sed 's/\([\.\+\$\*]\)/\\\1/g' + echo "$1" | sed 's/\([\.\$\*]\)/\\\1/g' } # set logic From 56bff9a830faca63a9d916a43034562b3b34f734 Mon Sep 17 00:00:00 2001 From: Vedang Manerikar Date: Mon, 30 Jan 2012 18:38:46 +0530 Subject: [PATCH 26/51] Added a -r flag to git-flow-feature-pull to support pull with rebase Signed-off-by: Vincent Driessen --- git-flow-feature | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/git-flow-feature b/git-flow-feature index 726b4aed5..d653ec11f 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -50,7 +50,7 @@ usage() { echo " git flow feature diff []" echo " git flow feature rebase [-i] []" echo " git flow feature checkout []" - echo " git flow feature pull []" + echo " git flow feature pull [-r] []" } cmd_default() { @@ -475,6 +475,7 @@ avoid_accidental_cross_branch_action() { cmd_pull() { #DEFINE_string prefix false 'alternative remote feature branch name prefix' p + DEFINE_boolean rebase false "pull with rebase" r parse_remote_name "$@" if [ -z "$REMOTE" ]; then @@ -500,7 +501,15 @@ cmd_pull() { # we already have a local branch called like this, so simply pull the # remote changes in - git pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." + if flag rebase; then + if ! git pull --rebase -q "$REMOTE" "$BRANCH"; then + warn "Pull was aborted. There might be conflicts during rebase or '$REMOTE' might be inaccessible." + exit 1 + fi + else + git pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." + fi + echo "Pulled $REMOTE's changes into $BRANCH." else # setup the local branch clone for the first time From 7384052ee61b4aa25bad65e20615b9a7502e5998 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 13 Feb 2012 20:43:12 +0100 Subject: [PATCH 27/51] Fix indenting. --- git-flow-feature | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/git-flow-feature b/git-flow-feature index d653ec11f..e97d67825 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -475,7 +475,7 @@ avoid_accidental_cross_branch_action() { cmd_pull() { #DEFINE_string prefix false 'alternative remote feature branch name prefix' p - DEFINE_boolean rebase false "pull with rebase" r + DEFINE_boolean rebase false "pull with rebase" r parse_remote_name "$@" if [ -z "$REMOTE" ]; then @@ -501,14 +501,14 @@ cmd_pull() { # we already have a local branch called like this, so simply pull the # remote changes in - if flag rebase; then - if ! git pull --rebase -q "$REMOTE" "$BRANCH"; then - warn "Pull was aborted. There might be conflicts during rebase or '$REMOTE' might be inaccessible." - exit 1 - fi - else - git pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." - fi + if flag rebase; then + if ! git pull --rebase -q "$REMOTE" "$BRANCH"; then + warn "Pull was aborted. There might be conflicts during rebase or '$REMOTE' might be inaccessible." + exit 1 + fi + else + it pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." + fi echo "Pulled $REMOTE's changes into $BRANCH." else From 53cfc35147096c5d5a43f8570b59a4b5b0aa7cf5 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 13 Feb 2012 20:48:14 +0100 Subject: [PATCH 28/51] Add Vedang to AUTHORS. --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 1c297540b..f7d1e6638 100644 --- a/AUTHORS +++ b/AUTHORS @@ -18,5 +18,6 @@ Authors are (ordered by first commit date): - Olivier Mengué - Emre Berge Ergenekon - Eric Holmes +- Vedang Manerikar Portions derived from other open source works are clearly marked. From 679f05f4fb52f870b2186eb6f74f7246868f4613 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 13 Feb 2012 20:53:21 +0100 Subject: [PATCH 29/51] Remove the "still maintained" banner. This is done in anticipation of their discontinuing service. --- README.mdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.mdown b/README.mdown index 45b896543..c7238e6f0 100644 --- a/README.mdown +++ b/README.mdown @@ -1,5 +1,6 @@ -git-flow ![Project status](http://stillmaintained.com/nvie/gitflow.png) +git-flow ======== + A collection of Git extensions to provide high-level repository operations for Vincent Driessen's [branching model](http://nvie.com/git-model "original blog post"). From f60828188567304a920197bae17d3246c8359ed2 Mon Sep 17 00:00:00 2001 From: Ben Loveridge Date: Fri, 6 Jan 2012 11:04:46 -0700 Subject: [PATCH 30/51] set EXPR_COMPAT=1 if running inside freebsd so shFlags works correctly Signed-off-by: Vincent Driessen --- git-flow | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-flow b/git-flow index a03ba1fd3..93e9f0f73 100755 --- a/git-flow +++ b/git-flow @@ -37,6 +37,9 @@ # policies, either expressed or implied, of Vincent Driessen. # +# set this to workaround expr problems in shFlags on freebsd +if uname -s | egrep -iq 'bsd'; then export EXPR_COMPAT=1; fi + # enable debug mode if [ "$DEBUG" = "yes" ]; then set -x From cc5e9a58bc84100df9b9e2f217ef8bb688ccd996 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 13 Feb 2012 21:20:22 +0100 Subject: [PATCH 31/51] Update the Changelog. --- Changes.mdown | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Changes.mdown b/Changes.mdown index 4e3936971..9f9aa1888 100644 --- a/Changes.mdown +++ b/Changes.mdown @@ -3,14 +3,19 @@ Release date: **not yet** * `git flow init` now detects situations where origin already has gitflow - branches set up, and behaves accordingly (thanks Emre Berge Ergenekon) + branches set up, and behaves accordingly (thanks Emre Berge Ergenekon). * `git flow feature finish` can now be called without a feature branch name(prefix) argument and will finish the current branch, if on any. -* Various minor bug fixes related to internal argument passing +* `git flow feature pull` now has a `-r` flag, to support `pull --rebase` + semantics (thanks Vedang Manerikar). -* Better support for Windows users. +* Various minor bug fixes related to internal argument passing. + +* Improved some documentation. + +* Better support for Windows and BSD users. * Add package installers for the Debian and Windows platforms. From 37f7d14b2f566390c824be6168ec730d11bb531e Mon Sep 17 00:00:00 2001 From: Vedang Manerikar Date: Mon, 12 Mar 2012 17:03:11 +0530 Subject: [PATCH 32/51] Added a track command to git-flow-hotfix along the lines of the git-flow-feature track command --- git-flow-hotfix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/git-flow-hotfix b/git-flow-hotfix index b355f3019..4ea87fc87 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -47,6 +47,7 @@ usage() { echo " git flow hotfix start [-F] []" echo " git flow hotfix finish [-Fsumpk] " echo " git flow hotfix publish " + echo " git flow hotfix track " } cmd_default() { @@ -216,6 +217,26 @@ cmd_publish() { echo } +cmd_track() { + parse_args "$@" + require_version_arg + + # sanity checks + require_clean_working_tree + require_branch_absent "$BRANCH" + git fetch -q "$ORIGIN" + require_branch "$ORIGIN/$BRANCH" + + # create tracking branch + git checkout -b "$BRANCH" "$ORIGIN/$BRANCH" + + echo + echo "Summary of actions:" + echo "- A new remote tracking branch '$BRANCH' was created" + echo "- You are now on branch '$BRANCH'" + echo +} + cmd_finish() { DEFINE_boolean fetch false "fetch from $ORIGIN before performing finish" F DEFINE_boolean sign false "sign the release tag cryptographically" s From 51011ac8fdfb1b66c34ea74186bf24412ca70eb2 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Wed, 14 Mar 2012 11:59:55 +0200 Subject: [PATCH 33/51] make the installer for msysgit search in ~/bin as well --- contrib/msysgit-install.cmd | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/msysgit-install.cmd b/contrib/msysgit-install.cmd index 5f005bfa7..994235c79 100644 --- a/contrib/msysgit-install.cmd +++ b/contrib/msysgit-install.cmd @@ -63,6 +63,7 @@ goto :End :ChkGetopt :: %1 is getopt.exe if exist "%GIT_HOME%\bin\%1" goto :EOF +if exist "%USERPROFILE%\bin\%1" goto :EOF if exist "%~f$PATH:1" goto :EOF echo %GIT_HOME%\bin\%1 not found.>&2 echo You have to install this file manually. See the GitFlow README. From afb191f790b113c1ebf0a5c4ab06676632a8b5db Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Mon, 9 Apr 2012 11:19:20 -0400 Subject: [PATCH 34/51] Fixes #206 --- git-flow-hotfix | 2 +- git-flow-release | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/git-flow-hotfix b/git-flow-hotfix index b355f3019..e827863b3 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -269,7 +269,7 @@ cmd_finish() { flag sign && opts="$opts -s" [ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" - eval git tag $opts "$VERSION_PREFIX$VERSION" || \ + eval git tag $opts "$VERSION_PREFIX$VERSION" "$BRANCH" || \ die "Tagging failed. Please run finish again to retry." fi fi diff --git a/git-flow-release b/git-flow-release index bb39d5276..e91a1acef 100644 --- a/git-flow-release +++ b/git-flow-release @@ -239,7 +239,7 @@ cmd_finish() { flag sign && opts="$opts -s" [ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" - eval git tag $opts "$tagname" || \ + eval git tag $opts "$tagname" "$BRANCH" || \ die "Tagging failed. Please run finish again to retry." fi fi From 6fa8fed23e2781767b8d3e8ab7e2b3f30876c7c7 Mon Sep 17 00:00:00 2001 From: Myke Hines Date: Thu, 19 Apr 2012 11:01:23 -0700 Subject: [PATCH 35/51] Release finish squash parameter Adding an optional (false by default) -S option to 'git flow release finish' to allow squashing the commit --- git-flow-release | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/git-flow-release b/git-flow-release index bb39d5276..67037d7a6 100644 --- a/git-flow-release +++ b/git-flow-release @@ -45,7 +45,7 @@ PREFIX=$(git config --get gitflow.prefix.release) usage() { echo "usage: git flow release [list] [-v]" echo " git flow release start [-F] []" - echo " git flow release finish [-Fsumpk] " + echo " git flow release finish [-FsumpkS] " echo " git flow release publish " echo " git flow release track " } @@ -193,6 +193,7 @@ cmd_finish() { DEFINE_boolean push false "push to $ORIGIN after performing finish" p DEFINE_boolean keep false "keep branch after performing finish" k DEFINE_boolean notag false "don't tag this release" n + DEFINE_boolean squash false "squash release during merge" S parse_args "$@" require_version_arg @@ -224,9 +225,15 @@ cmd_finish() { if ! git_is_branch_merged_into "$BRANCH" "$MASTER_BRANCH"; then git checkout "$MASTER_BRANCH" || \ die "Could not check out $MASTER_BRANCH." - git merge --no-ff "$BRANCH" || \ - die "There were merge conflicts." - # TODO: What do we do now? + if noflag squash; then + git merge --no-ff "$BRANCH" || \ + die "There were merge conflicts." + # TODO: What do we do now? + else + git merge --squash "$BRANCH" || \ + die "There were merge conflicts." + git commit + fi fi if noflag notag; then @@ -253,9 +260,16 @@ cmd_finish() { # TODO: Actually, accounting for 'git describe' pays, so we should # ideally git merge --no-ff $tagname here, instead! - git merge --no-ff "$BRANCH" || \ - die "There were merge conflicts." - # TODO: What do we do now? + if noflag squash; then + git merge --no-ff "$BRANCH" || \ + die "There were merge conflicts." + # TODO: What do we do now? + else + git merge --squash "$BRANCH" || \ + die "There were merge conflicts." + # TODO: What do we do now? + git commit + fi fi # delete branch From 75fbdd7bf7b81eb8965f5ec4e78fc8776373aa75 Mon Sep 17 00:00:00 2001 From: Myke Hines Date: Thu, 19 Apr 2012 11:14:22 -0700 Subject: [PATCH 36/51] Feature finish squash parameter Adding an optional (false by default) -S option to 'git flow feature finish' to allow squashing the commit --- git-flow-feature | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/git-flow-feature b/git-flow-feature index e97d67825..c85c1e37f 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -44,7 +44,7 @@ PREFIX=$(git config --get gitflow.prefix.feature) usage() { echo "usage: git flow feature [list] [-v]" echo " git flow feature start [-F] []" - echo " git flow feature finish [-rFkD] []" + echo " git flow feature finish [-rFkDS] []" echo " git flow feature publish " echo " git flow feature track " echo " git flow feature diff []" @@ -232,6 +232,7 @@ cmd_finish() { DEFINE_boolean rebase false "rebase instead of merge" r DEFINE_boolean keep false "keep branch after performing finish" k DEFINE_boolean force_delete false "force delete feature branch after finish" D + DEFINE_boolean squash false "squash feature during merge" S parse_args "$@" expand_nameprefix_arg_or_current @@ -312,7 +313,13 @@ cmd_finish() { if [ "$(git rev-list -n2 "$DEVELOP_BRANCH..$BRANCH" | wc -l)" -eq 1 ]; then git merge --ff "$BRANCH" else - git merge --no-ff "$BRANCH" + if noflag squash; then + git merge --no-ff "$BRANCH" + else + git merge --squash "$BRANCH" + git commit + git merge "$BRANCH" + fi fi if [ $? -ne 0 ]; then @@ -353,7 +360,7 @@ helper_finish_cleanup() { git branch -d "$BRANCH" fi fi - +t echo echo "Summary of actions:" echo "- The feature branch '$BRANCH' was merged into '$DEVELOP_BRANCH'" From dc902eda3e79ae00a293b9dd2006c019ab252520 Mon Sep 17 00:00:00 2001 From: pccr Date: Sat, 21 Apr 2012 00:23:55 -0400 Subject: [PATCH 37/51] Added 'init()' function to git-flow-{feature,release,hotfix,support}, which gets called if subargument is not help --- git-flow | 5 ++++- git-flow-feature | 10 ++++++---- git-flow-hotfix | 12 +++++++----- git-flow-release | 12 +++++++----- git-flow-support | 12 +++++++----- 5 files changed, 31 insertions(+), 20 deletions(-) diff --git a/git-flow b/git-flow index 93e9f0f73..19c337ef7 100755 --- a/git-flow +++ b/git-flow @@ -109,7 +109,10 @@ main() { fi # run the specified action - cmd_$SUBACTION "$@" + if [ $SUBACTION != "help" ]; then + init + fi + cmd_$SUBACTION "$@" } main "$@" diff --git a/git-flow-feature b/git-flow-feature index e97d67825..4f7e83956 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -36,10 +36,12 @@ # policies, either expressed or implied, of Vincent Driessen. # -require_git_repo -require_gitflow_initialized -gitflow_load_settings -PREFIX=$(git config --get gitflow.prefix.feature) +init() { + require_git_repo + require_gitflow_initialized + gitflow_load_settings + PREFIX=$(git config --get gitflow.prefix.feature) +} usage() { echo "usage: git flow feature [list] [-v]" diff --git a/git-flow-hotfix b/git-flow-hotfix index b355f3019..6e2c6d58f 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -36,11 +36,13 @@ # policies, either expressed or implied, of Vincent Driessen. # -require_git_repo -require_gitflow_initialized -gitflow_load_settings -VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`") -PREFIX=$(git config --get gitflow.prefix.hotfix) +init() { + require_git_repo + require_gitflow_initialized + gitflow_load_settings + VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`") + PREFIX=$(git config --get gitflow.prefix.hotfix) +} usage() { echo "usage: git flow hotfix [list] [-v]" diff --git a/git-flow-release b/git-flow-release index bb39d5276..62e3015a6 100644 --- a/git-flow-release +++ b/git-flow-release @@ -36,11 +36,13 @@ # policies, either expressed or implied, of Vincent Driessen. # -require_git_repo -require_gitflow_initialized -gitflow_load_settings -VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`") -PREFIX=$(git config --get gitflow.prefix.release) +init() { + require_git_repo + require_gitflow_initialized + gitflow_load_settings + VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`") + PREFIX=$(git config --get gitflow.prefix.release) +} usage() { echo "usage: git flow release [list] [-v]" diff --git a/git-flow-support b/git-flow-support index 605694dc9..ba4d92f2f 100644 --- a/git-flow-support +++ b/git-flow-support @@ -36,11 +36,13 @@ # policies, either expressed or implied, of Vincent Driessen. # -require_git_repo -require_gitflow_initialized -gitflow_load_settings -VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`") -PREFIX=$(git config --get gitflow.prefix.support) +init() { + require_git_repo + require_gitflow_initialized + gitflow_load_settings + VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`") + PREFIX=$(git config --get gitflow.prefix.support) +} warn "note: The support subcommand is still very EXPERIMENTAL!" warn "note: DO NOT use it in a production situation." From a223c3a63326f4803f7679748933c0740fcf2dc8 Mon Sep 17 00:00:00 2001 From: Kostas Date: Thu, 31 May 2012 12:28:37 +0100 Subject: [PATCH 38/51] fixed small bug in line 510, 'it' instead of 'git' --- git-flow-feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-flow-feature b/git-flow-feature index e97d67825..eea2b6a78 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -507,7 +507,7 @@ cmd_pull() { exit 1 fi else - it pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." + git pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." fi echo "Pulled $REMOTE's changes into $BRANCH." From 12c2a9c307058cc38f965bd4a412af7c16192090 Mon Sep 17 00:00:00 2001 From: memleak Date: Fri, 1 Jun 2012 13:45:31 +0300 Subject: [PATCH 39/51] fixes pull existing feature from remote. --- git-flow-feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-flow-feature b/git-flow-feature index e97d67825..eea2b6a78 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -507,7 +507,7 @@ cmd_pull() { exit 1 fi else - it pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." + git pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." fi echo "Pulled $REMOTE's changes into $BRANCH." From 26327787c75249ca684af39bc111a5f4847ae01e Mon Sep 17 00:00:00 2001 From: Steve Streeting Date: Tue, 5 Jun 2012 16:26:10 -0700 Subject: [PATCH 40/51] Fix init -d behaviour when master branch exists, and one or more other branch exists, but develop does not Without this change, init picks 'master' as both the production and integration branch and fails. With it, init detects the clash and behaves the same as if only master exists, picking 'develop' as integration branch --- git-flow-init | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/git-flow-init b/git-flow-init index 4afa1c25e..00646fed7 100644 --- a/git-flow-init +++ b/git-flow-init @@ -153,11 +153,17 @@ cmd_default() { default_suggestion= for guess in $(git config --get gitflow.branch.develop) \ 'develop' 'int' 'integration' 'master'; do - if git_local_branch_exists "$guess"; then + if git_local_branch_exists "$guess" && [ "$guess" != "$master_branch" ]; then default_suggestion="$guess" break fi done + + if [ -z $default_suggestion ]; then + should_check_existence=NO + default_suggestion=$(git config --get gitflow.branch.develop || echo develop) + fi + fi printf "Branch name for \"next release\" development: [$default_suggestion] " From 2e9ab49e7548e3593007ddaac4dd45c1c746b202 Mon Sep 17 00:00:00 2001 From: Steve Streeting Date: Fri, 8 Jun 2012 17:38:34 -0700 Subject: [PATCH 41/51] Support reading the tag message from a file in release/hotfix finish This option ('-f' because '-F' was already taken) maps to the 'tag -F' option, and avoids the problem with issue #98 (https://github.com/nvie/gitflow/issues/98) on Mac --- git-flow-hotfix | 2 ++ git-flow-release | 2 ++ 2 files changed, 4 insertions(+) diff --git a/git-flow-hotfix b/git-flow-hotfix index b355f3019..c37be771d 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -221,6 +221,7 @@ cmd_finish() { DEFINE_boolean sign false "sign the release tag cryptographically" s DEFINE_string signingkey "" "use the given GPG-key for the digital signature (implies -s)" u DEFINE_string message "" "use the given tag message" m + DEFINE_string messagefile "" "use the contents of the given file as tag message" f DEFINE_boolean push false "push to $ORIGIN after performing finish" p DEFINE_boolean keep false "keep branch after performing finish" k DEFINE_boolean notag false "don't tag this release" n @@ -269,6 +270,7 @@ cmd_finish() { flag sign && opts="$opts -s" [ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" + [ "$FLAGS_messagefile" != "" ] && opts="$opts -F '$FLAGS_messagefile'" eval git tag $opts "$VERSION_PREFIX$VERSION" || \ die "Tagging failed. Please run finish again to retry." fi diff --git a/git-flow-release b/git-flow-release index bb39d5276..38d93b1d8 100644 --- a/git-flow-release +++ b/git-flow-release @@ -190,6 +190,7 @@ cmd_finish() { DEFINE_boolean sign false "sign the release tag cryptographically" s DEFINE_string signingkey "" "use the given GPG-key for the digital signature (implies -s)" u DEFINE_string message "" "use the given tag message" m + DEFINE_string messagefile "" "use the contents of the given file as a tag message" f DEFINE_boolean push false "push to $ORIGIN after performing finish" p DEFINE_boolean keep false "keep branch after performing finish" k DEFINE_boolean notag false "don't tag this release" n @@ -239,6 +240,7 @@ cmd_finish() { flag sign && opts="$opts -s" [ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" + [ "$FLAGS_messagefile" != "" ] && opts="$opts -F '$FLAGS_messagefile'" eval git tag $opts "$tagname" || \ die "Tagging failed. Please run finish again to retry." fi From 9c48e0569a4e6ce0c028ce580c6c0a592f916b07 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Tue, 3 Jul 2012 13:25:52 -0700 Subject: [PATCH 42/51] Fix broken link to original blog-post --- README.mdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.mdown b/README.mdown index c7238e6f0..a01079b4b 100644 --- a/README.mdown +++ b/README.mdown @@ -138,7 +138,7 @@ Showing your appreciation A few people already requested it, so now it's here: a Flattr button. Of course, the best way to show your appreciation for the original -[blog post](http://nvie.com/git-model) or the git-flow tool itself remains +[blog post](http://nvie.com/posts/a-successful-git-branching-model/) or the git-flow tool itself remains contributing to the community. If you'd like to show your appreciation in another way, however, consider Flattr'ing me: From 0c4d0bf0f01b252967fb8f79d946642901d80b92 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 9 Jul 2012 14:23:59 +0200 Subject: [PATCH 43/51] Cleanup (mostly whitespace issues). --- git-flow-feature | 16 ++++++++-------- git-flow-release | 40 ++++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/git-flow-feature b/git-flow-feature index c85c1e37f..8014fcc85 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -232,7 +232,7 @@ cmd_finish() { DEFINE_boolean rebase false "rebase instead of merge" r DEFINE_boolean keep false "keep branch after performing finish" k DEFINE_boolean force_delete false "force delete feature branch after finish" D - DEFINE_boolean squash false "squash feature during merge" S + DEFINE_boolean squash false "squash feature during merge" S parse_args "$@" expand_nameprefix_arg_or_current @@ -313,13 +313,13 @@ cmd_finish() { if [ "$(git rev-list -n2 "$DEVELOP_BRANCH..$BRANCH" | wc -l)" -eq 1 ]; then git merge --ff "$BRANCH" else - if noflag squash; then + if noflag squash; then git merge --no-ff "$BRANCH" - else - git merge --squash "$BRANCH" - git commit - git merge "$BRANCH" - fi + else + git merge --squash "$BRANCH" + git commit + git merge "$BRANCH" + fi fi if [ $? -ne 0 ]; then @@ -360,7 +360,7 @@ helper_finish_cleanup() { git branch -d "$BRANCH" fi fi -t + echo echo "Summary of actions:" echo "- The feature branch '$BRANCH' was merged into '$DEVELOP_BRANCH'" diff --git a/git-flow-release b/git-flow-release index 67037d7a6..e246b37b7 100644 --- a/git-flow-release +++ b/git-flow-release @@ -193,7 +193,7 @@ cmd_finish() { DEFINE_boolean push false "push to $ORIGIN after performing finish" p DEFINE_boolean keep false "keep branch after performing finish" k DEFINE_boolean notag false "don't tag this release" n - DEFINE_boolean squash false "squash release during merge" S + DEFINE_boolean squash false "squash release during merge" S parse_args "$@" require_version_arg @@ -225,15 +225,15 @@ cmd_finish() { if ! git_is_branch_merged_into "$BRANCH" "$MASTER_BRANCH"; then git checkout "$MASTER_BRANCH" || \ die "Could not check out $MASTER_BRANCH." - if noflag squash; then - git merge --no-ff "$BRANCH" || \ - die "There were merge conflicts." - # TODO: What do we do now? - else - git merge --squash "$BRANCH" || \ - die "There were merge conflicts." - git commit - fi + if noflag squash; then + git merge --no-ff "$BRANCH" || \ + die "There were merge conflicts." + # TODO: What do we do now? + else + git merge --squash "$BRANCH" || \ + die "There were merge conflicts." + git commit + fi fi if noflag notag; then @@ -260,16 +260,16 @@ cmd_finish() { # TODO: Actually, accounting for 'git describe' pays, so we should # ideally git merge --no-ff $tagname here, instead! - if noflag squash; then - git merge --no-ff "$BRANCH" || \ - die "There were merge conflicts." - # TODO: What do we do now? - else - git merge --squash "$BRANCH" || \ - die "There were merge conflicts." - # TODO: What do we do now? - git commit - fi + if noflag squash; then + git merge --no-ff "$BRANCH" || \ + die "There were merge conflicts." + # TODO: What do we do now? + else + git merge --squash "$BRANCH" || \ + die "There were merge conflicts." + # TODO: What do we do now? + git commit + fi fi # delete branch From 805d2454ee0fd68e1bf0778b38d05789998daadf Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 9 Jul 2012 14:31:17 +0200 Subject: [PATCH 44/51] Credit where credit is due. --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index f7d1e6638..aded955fc 100644 --- a/AUTHORS +++ b/AUTHORS @@ -19,5 +19,6 @@ Authors are (ordered by first commit date): - Emre Berge Ergenekon - Eric Holmes - Vedang Manerikar +- Myke Hines Portions derived from other open source works are clearly marked. From c7e50eed6ed23002778bcaaccd70c4e91a7d5cea Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 9 Jul 2012 14:37:29 +0200 Subject: [PATCH 45/51] Revert unnecessary changes. --- git-flow-feature | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/git-flow-feature b/git-flow-feature index 39c1d1957..e97d67825 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -9,17 +9,17 @@ # http://github.com/nvie/gitflow # # Copyright 2010 Vincent Driessen. All rights reserved. -# +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: -# +# # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. -# +# # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# +# # THIS SOFTWARE IS PROVIDED BY VINCENT DRIESSEN ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO @@ -30,7 +30,7 @@ # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# +# # The views and conclusions contained in the software and documentation are # those of the authors and should not be interpreted as representing official # policies, either expressed or implied, of Vincent Driessen. @@ -244,7 +244,7 @@ cmd_finish() { # TODO: detect that we're working on the correct branch here! # The user need not necessarily have given the same $NAME twice here # (although he/she should). - # + # # TODO: git_is_clean_working_tree() should provide an alternative # exit code for "unmerged changes in working tree", which we should @@ -270,7 +270,7 @@ cmd_finish() { echo "Merge conflicts not resolved yet, use:" echo " git mergetool" echo " git commit" - echo + echo echo "You can then complete the finish by running it again:" echo " git flow feature finish $NAME" echo @@ -324,7 +324,7 @@ cmd_finish() { echo "There were merge conflicts. To resolve the merge conflict manually, use:" echo " git mergetool" echo " git commit" - echo + echo echo "You can then complete the finish by running it again:" echo " git flow feature finish $NAME" echo @@ -344,8 +344,8 @@ helper_finish_cleanup() { if flag fetch; then git push "$ORIGIN" ":refs/heads/$BRANCH" fi - - + + if noflag keep; then if flag force_delete; then git branch -D "$BRANCH" From 76ec133f9d2a643a930c05b126e5673f4c2c5f75 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 9 Jul 2012 14:38:01 +0200 Subject: [PATCH 46/51] Revert changes installer location. --- contrib/gitflow-installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/gitflow-installer.sh b/contrib/gitflow-installer.sh index 68dcec018..0e92ffcef 100644 --- a/contrib/gitflow-installer.sh +++ b/contrib/gitflow-installer.sh @@ -17,7 +17,7 @@ if [ -z "$REPO_NAME" ] ; then fi if [ -z "$REPO_HOME" ] ; then - REPO_HOME="http://github.com/vedang/gitflow.git" + REPO_HOME="http://github.com/nvie/gitflow.git" fi EXEC_FILES="git-flow" From b72a395ba6d0659f1008754000bb6a066a7fb551 Mon Sep 17 00:00:00 2001 From: Fred Condo Date: Mon, 9 Jul 2012 18:37:12 -0700 Subject: [PATCH 47/51] Prevent error message on git flow init As explained by Peter van der Does, the init command does not have the init function, nor does it need one. --- git-flow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-flow b/git-flow index 19c337ef7..cdf0e07c1 100755 --- a/git-flow +++ b/git-flow @@ -109,7 +109,7 @@ main() { fi # run the specified action - if [ $SUBACTION != "help" ]; then + if [ $SUBACTION != "help" ] && [ $SUBCOMMAND != "init" ] ; then init fi cmd_$SUBACTION "$@" From 5bca8d9358f5b08af40ac32f289bb14b18965cec Mon Sep 17 00:00:00 2001 From: Jerome Baum Date: Tue, 25 Sep 2012 15:46:44 +0200 Subject: [PATCH 48/51] Create a git_do command to log git actions --- git-flow | 5 +++++ gitflow-common | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/git-flow b/git-flow index cdf0e07c1..fd16d5168 100755 --- a/git-flow +++ b/git-flow @@ -80,6 +80,11 @@ main() { # use the shFlags project to parse the command line arguments . "$GITFLOW_DIR/gitflow-shFlags" FLAGS_PARENT="git flow" + + # allow user to request git action logging + DEFINE_boolean show_commands false 'show actions taken (git commands)' g + + # do actual parsing FLAGS "$@" || exit $? eval set -- "${FLAGS_ARGV}" diff --git a/gitflow-common b/gitflow-common index 4834cf102..332740533 100644 --- a/gitflow-common +++ b/gitflow-common @@ -70,6 +70,14 @@ noflag() { local FLAG; eval FLAG='$FLAGS_'$1; [ $FLAG -ne $FLAGS_TRUE ]; } # Git specific common functionality # +git_do() { + # equivalent to git, used to indicate actions that make modifications + if flag show_commands; then + echo "git $@" >&2 + fi + git "$@" +} + git_local_branches() { git branch --no-color | sed 's/^[* ] //'; } git_remote_branches() { git branch -r --no-color | sed 's/^[* ] //'; } git_all_branches() { ( git branch --no-color; git branch -r --no-color) | sed 's/^[* ] //'; } From 15aab26490facf285acef56cb5d61025eacb3a69 Mon Sep 17 00:00:00 2001 From: Jerome Baum Date: Tue, 25 Sep 2012 15:46:52 +0200 Subject: [PATCH 49/51] Use git_do where appropriate --- git-flow-feature | 58 ++++++++++++++++++++++++------------------------ git-flow-hotfix | 38 +++++++++++++++---------------- git-flow-init | 28 +++++++++++------------ git-flow-release | 56 +++++++++++++++++++++++----------------------- git-flow-support | 4 ++-- 5 files changed, 92 insertions(+), 92 deletions(-) diff --git a/git-flow-feature b/git-flow-feature index 3ee35efc2..55198ad82 100644 --- a/git-flow-feature +++ b/git-flow-feature @@ -204,7 +204,7 @@ cmd_start() { # update the local repo with remote changes, if asked if flag fetch; then - git fetch -q "$ORIGIN" "$DEVELOP_BRANCH" + git_do fetch -q "$ORIGIN" "$DEVELOP_BRANCH" fi # if the origin branch counterpart exists, assert that the local branch @@ -214,7 +214,7 @@ cmd_start() { fi # create branch - if ! git checkout -b "$BRANCH" "$BASE"; then + if ! git_do checkout -b "$BRANCH" "$BASE"; then die "Could not create feature branch '$BRANCH'" fi @@ -287,8 +287,8 @@ cmd_finish() { # update local repo with remote changes first, if asked if has "$ORIGIN/$BRANCH" $(git_remote_branches); then if flag fetch; then - git fetch -q "$ORIGIN" "$BRANCH" - git fetch -q "$ORIGIN" "$DEVELOP_BRANCH" + git_do fetch -q "$ORIGIN" "$BRANCH" + git_do fetch -q "$ORIGIN" "$DEVELOP_BRANCH" fi fi @@ -311,16 +311,16 @@ cmd_finish() { fi # merge into BASE - git checkout "$DEVELOP_BRANCH" + git_do checkout "$DEVELOP_BRANCH" if [ "$(git rev-list -n2 "$DEVELOP_BRANCH..$BRANCH" | wc -l)" -eq 1 ]; then - git merge --ff "$BRANCH" + git_do merge --ff "$BRANCH" else if noflag squash; then - git merge --no-ff "$BRANCH" + git_do merge --no-ff "$BRANCH" else - git merge --squash "$BRANCH" - git commit - git merge "$BRANCH" + git_do merge --squash "$BRANCH" + git_do commit + git_do merge "$BRANCH" fi fi @@ -351,15 +351,15 @@ helper_finish_cleanup() { # delete branch if flag fetch; then - git push "$ORIGIN" ":refs/heads/$BRANCH" + git_do push "$ORIGIN" ":refs/heads/$BRANCH" fi if noflag keep; then if flag force_delete; then - git branch -D "$BRANCH" + git_do branch -D "$BRANCH" else - git branch -d "$BRANCH" + git_do branch -d "$BRANCH" fi fi @@ -383,17 +383,17 @@ cmd_publish() { # sanity checks require_clean_working_tree require_branch "$BRANCH" - git fetch -q "$ORIGIN" + git_do fetch -q "$ORIGIN" require_branch_absent "$ORIGIN/$BRANCH" # create remote branch - git push "$ORIGIN" "$BRANCH:refs/heads/$BRANCH" - git fetch -q "$ORIGIN" + git_do push "$ORIGIN" "$BRANCH:refs/heads/$BRANCH" + git_do fetch -q "$ORIGIN" # configure remote tracking - git config "branch.$BRANCH.remote" "$ORIGIN" - git config "branch.$BRANCH.merge" "refs/heads/$BRANCH" - git checkout "$BRANCH" + git_do config "branch.$BRANCH.remote" "$ORIGIN" + git_do config "branch.$BRANCH.merge" "refs/heads/$BRANCH" + git_do checkout "$BRANCH" echo echo "Summary of actions:" @@ -410,11 +410,11 @@ cmd_track() { # sanity checks require_clean_working_tree require_branch_absent "$BRANCH" - git fetch -q "$ORIGIN" + git_do fetch -q "$ORIGIN" require_branch "$ORIGIN/$BRANCH" # create tracking branch - git checkout -b "$BRANCH" "$ORIGIN/$BRANCH" + git_do checkout -b "$BRANCH" "$ORIGIN/$BRANCH" echo echo "Summary of actions:" @@ -445,7 +445,7 @@ cmd_checkout() { if [ "$NAME" != "" ]; then expand_nameprefix_arg - git checkout "$BRANCH" + git_do checkout "$BRANCH" else die "Name a feature branch explicitly." fi @@ -464,12 +464,12 @@ cmd_rebase() { require_clean_working_tree require_branch "$BRANCH" - git checkout -q "$BRANCH" + git_do checkout -q "$BRANCH" local OPTS= if flag interactive; then OPTS="$OPTS -i" fi - git rebase $OPTS "$DEVELOP_BRANCH" + git_do rebase $OPTS "$DEVELOP_BRANCH" } avoid_accidental_cross_branch_action() { @@ -511,20 +511,20 @@ cmd_pull() { # we already have a local branch called like this, so simply pull the # remote changes in if flag rebase; then - if ! git pull --rebase -q "$REMOTE" "$BRANCH"; then + if ! git_do pull --rebase -q "$REMOTE" "$BRANCH"; then warn "Pull was aborted. There might be conflicts during rebase or '$REMOTE' might be inaccessible." exit 1 fi else - git pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." + git_do pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'." fi echo "Pulled $REMOTE's changes into $BRANCH." else # setup the local branch clone for the first time - git fetch -q "$REMOTE" "$BRANCH" || die "Fetch failed." # stores in FETCH_HEAD - git branch --no-track "$BRANCH" FETCH_HEAD || die "Branch failed." - git checkout -q "$BRANCH" || die "Checking out new local branch failed." + git_do fetch -q "$REMOTE" "$BRANCH" || die "Fetch failed." # stores in FETCH_HEAD + git_do branch --no-track "$BRANCH" FETCH_HEAD || die "Branch failed." + git_do checkout -q "$BRANCH" || die "Checking out new local branch failed." echo "Created local branch $BRANCH based on $REMOTE's $BRANCH." fi } diff --git a/git-flow-hotfix b/git-flow-hotfix index a3bcfd15b..ba485f6fe 100644 --- a/git-flow-hotfix +++ b/git-flow-hotfix @@ -169,14 +169,14 @@ cmd_start() { require_branch_absent "$BRANCH" require_tag_absent "$VERSION_PREFIX$VERSION" if flag fetch; then - git fetch -q "$ORIGIN" "$MASTER_BRANCH" + git_do fetch -q "$ORIGIN" "$MASTER_BRANCH" fi if has "$ORIGIN/$MASTER_BRANCH" $(git_remote_branches); then require_branches_equal "$MASTER_BRANCH" "$ORIGIN/$MASTER_BRANCH" fi # create branch - git checkout -b "$BRANCH" "$BASE" + git_do checkout -b "$BRANCH" "$BASE" echo echo "Summary of actions:" @@ -199,17 +199,17 @@ cmd_publish() { # sanity checks require_clean_working_tree require_branch "$BRANCH" - git fetch -q "$ORIGIN" + git_do fetch -q "$ORIGIN" require_branch_absent "$ORIGIN/$BRANCH" # create remote branch - git push "$ORIGIN" "$BRANCH:refs/heads/$BRANCH" - git fetch -q "$ORIGIN" + git_do push "$ORIGIN" "$BRANCH:refs/heads/$BRANCH" + git_do fetch -q "$ORIGIN" # configure remote tracking git config "branch.$BRANCH.remote" "$ORIGIN" git config "branch.$BRANCH.merge" "refs/heads/$BRANCH" - git checkout "$BRANCH" + git_do checkout "$BRANCH" echo echo "Summary of actions:" @@ -226,11 +226,11 @@ cmd_track() { # sanity checks require_clean_working_tree require_branch_absent "$BRANCH" - git fetch -q "$ORIGIN" + git_do fetch -q "$ORIGIN" require_branch "$ORIGIN/$BRANCH" # create tracking branch - git checkout -b "$BRANCH" "$ORIGIN/$BRANCH" + git_do checkout -b "$BRANCH" "$ORIGIN/$BRANCH" echo echo "Summary of actions:" @@ -260,9 +260,9 @@ cmd_finish() { require_branch "$BRANCH" require_clean_working_tree if flag fetch; then - git fetch -q "$ORIGIN" "$MASTER_BRANCH" || \ + git_do fetch -q "$ORIGIN" "$MASTER_BRANCH" || \ die "Could not fetch $MASTER_BRANCH from $ORIGIN." - git fetch -q "$ORIGIN" "$DEVELOP_BRANCH" || \ + git_do fetch -q "$ORIGIN" "$DEVELOP_BRANCH" || \ die "Could not fetch $DEVELOP_BRANCH from $ORIGIN." fi if has "$ORIGIN/$MASTER_BRANCH" $(git_remote_branches); then @@ -276,9 +276,9 @@ cmd_finish() { # in case a previous attempt to finish this release branch has failed, # but the merge into master was successful, we skip it now if ! git_is_branch_merged_into "$BRANCH" "$MASTER_BRANCH"; then - git checkout "$MASTER_BRANCH" || \ + git_do checkout "$MASTER_BRANCH" || \ die "Could not check out $MASTER_BRANCH." - git merge --no-ff "$BRANCH" || \ + git_do merge --no-ff "$BRANCH" || \ die "There were merge conflicts." # TODO: What do we do now? fi @@ -294,7 +294,7 @@ cmd_finish() { [ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" [ "$FLAGS_messagefile" != "" ] && opts="$opts -F '$FLAGS_messagefile'" - eval git tag $opts "$VERSION_PREFIX$VERSION" "$BRANCH" || \ + eval git_do tag $opts "$VERSION_PREFIX$VERSION" "$BRANCH" || \ die "Tagging failed. Please run finish again to retry." fi fi @@ -303,28 +303,28 @@ cmd_finish() { # in case a previous attempt to finish this release branch has failed, # but the merge into develop was successful, we skip it now if ! git_is_branch_merged_into "$BRANCH" "$DEVELOP_BRANCH"; then - git checkout "$DEVELOP_BRANCH" || \ + git_do checkout "$DEVELOP_BRANCH" || \ die "Could not check out $DEVELOP_BRANCH." # TODO: Actually, accounting for 'git describe' pays, so we should # ideally git merge --no-ff $tagname here, instead! - git merge --no-ff "$BRANCH" || \ + git_do merge --no-ff "$BRANCH" || \ die "There were merge conflicts." # TODO: What do we do now? fi # delete branch if noflag keep; then - git branch -d "$BRANCH" + git_do branch -d "$BRANCH" fi if flag push; then - git push "$ORIGIN" "$DEVELOP_BRANCH" || \ + git_do push "$ORIGIN" "$DEVELOP_BRANCH" || \ die "Could not push to $DEVELOP_BRANCH from $ORIGIN." - git push "$ORIGIN" "$MASTER_BRANCH" || \ + git_do push "$ORIGIN" "$MASTER_BRANCH" || \ die "Could not push to $MASTER_BRANCH from $ORIGIN." if noflag notag; then - git push --tags "$ORIGIN" || \ + git_do push --tags "$ORIGIN" || \ die "Could not push tags to $ORIGIN." fi fi diff --git a/git-flow-init b/git-flow-init index 00646fed7..5b4e7e807 100644 --- a/git-flow-init +++ b/git-flow-init @@ -53,7 +53,7 @@ cmd_default() { parse_args "$@" if ! git rev-parse --git-dir >/dev/null 2>&1; then - git init + git_do init else # assure that we are not working in a repo with local changes git_repo_is_headless || require_clean_working_tree @@ -121,14 +121,14 @@ cmd_default() { # name exists, checkout that branch and use it for master if ! git_local_branch_exists "$master_branch" && \ git_remote_branch_exists "origin/$master_branch"; then - git branch "$master_branch" "origin/$master_branch" >/dev/null 2>&1 + git_do branch "$master_branch" "origin/$master_branch" >/dev/null 2>&1 elif ! git_local_branch_exists "$master_branch"; then die "Local branch '$master_branch' does not exist." fi fi # store the name of the master branch - git config gitflow.branch.master "$master_branch" + git_do config gitflow.branch.master "$master_branch" fi # add a develop branch if no such branch exists yet @@ -185,7 +185,7 @@ cmd_default() { fi # store the name of the develop branch - git config gitflow.branch.develop "$develop_branch" + git_do config gitflow.branch.develop "$develop_branch" fi # Creation of HEAD @@ -194,8 +194,8 @@ cmd_default() { # it to be able to create new branches. local created_gitflow_branch=0 if ! git rev-parse --quiet --verify HEAD >/dev/null 2>&1; then - git symbolic-ref HEAD "refs/heads/$master_branch" - git commit --allow-empty --quiet -m "Initial commit" + git_do symbolic-ref HEAD "refs/heads/$master_branch" + git_do commit --allow-empty --quiet -m "Initial commit" created_gitflow_branch=1 fi @@ -213,9 +213,9 @@ cmd_default() { # the develop branch now in that case (we base it on master, of course) if ! git_local_branch_exists "$develop_branch"; then if git_remote_branch_exists "origin/$develop_branch"; then - git branch "$develop_branch" "origin/$develop_branch" >/dev/null 2>&1 + git_do branch "$develop_branch" "origin/$develop_branch" >/dev/null 2>&1 else - git branch --no-track "$develop_branch" "$master_branch" + git_do branch --no-track "$develop_branch" "$master_branch" fi created_gitflow_branch=1 fi @@ -225,7 +225,7 @@ cmd_default() { # switch to develop branch if its newly created if [ $created_gitflow_branch -eq 1 ]; then - git checkout -q "$develop_branch" + git_do checkout -q "$develop_branch" fi # finally, ask the user for naming conventions (branch and tag prefixes) @@ -251,7 +251,7 @@ cmd_default() { printf "\n" fi [ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion} - git config gitflow.prefix.feature "$prefix" + git_do config gitflow.prefix.feature "$prefix" fi # Release branches @@ -264,7 +264,7 @@ cmd_default() { printf "\n" fi [ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion} - git config gitflow.prefix.release "$prefix" + git_do config gitflow.prefix.release "$prefix" fi @@ -278,7 +278,7 @@ cmd_default() { printf "\n" fi [ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion} - git config gitflow.prefix.hotfix "$prefix" + git_do config gitflow.prefix.hotfix "$prefix" fi @@ -292,7 +292,7 @@ cmd_default() { printf "\n" fi [ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion} - git config gitflow.prefix.support "$prefix" + git_do config gitflow.prefix.support "$prefix" fi @@ -306,7 +306,7 @@ cmd_default() { printf "\n" fi [ "$answer" = "-" ] && prefix= || prefix=${answer:-$default_suggestion} - git config gitflow.prefix.versiontag "$prefix" + git_do config gitflow.prefix.versiontag "$prefix" fi diff --git a/git-flow-release b/git-flow-release index 2d81ed62d..cb95bd486 100644 --- a/git-flow-release +++ b/git-flow-release @@ -136,7 +136,7 @@ require_version_arg() { } require_base_is_on_develop() { - if ! git branch --no-color --contains "$BASE" 2>/dev/null \ + if ! git_do branch --no-color --contains "$BASE" 2>/dev/null \ | sed 's/[* ] //g' \ | grep -q "^$DEVELOP_BRANCH\$"; then die "fatal: Given base '$BASE' is not a valid commit on '$DEVELOP_BRANCH'." @@ -164,14 +164,14 @@ cmd_start() { require_branch_absent "$BRANCH" require_tag_absent "$VERSION_PREFIX$VERSION" if flag fetch; then - git fetch -q "$ORIGIN" "$DEVELOP_BRANCH" + git_do fetch -q "$ORIGIN" "$DEVELOP_BRANCH" fi if has "$ORIGIN/$DEVELOP_BRANCH" $(git_remote_branches); then require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH" fi # create branch - git checkout -b "$BRANCH" "$BASE" + git_do checkout -b "$BRANCH" "$BASE" echo echo "Summary of actions:" @@ -210,9 +210,9 @@ cmd_finish() { require_branch "$BRANCH" require_clean_working_tree if flag fetch; then - git fetch -q "$ORIGIN" "$MASTER_BRANCH" || \ + git_do fetch -q "$ORIGIN" "$MASTER_BRANCH" || \ die "Could not fetch $MASTER_BRANCH from $ORIGIN." - git fetch -q "$ORIGIN" "$DEVELOP_BRANCH" || \ + git_do fetch -q "$ORIGIN" "$DEVELOP_BRANCH" || \ die "Could not fetch $DEVELOP_BRANCH from $ORIGIN." fi if has "$ORIGIN/$MASTER_BRANCH" $(git_remote_branches); then @@ -226,16 +226,16 @@ cmd_finish() { # in case a previous attempt to finish this release branch has failed, # but the merge into master was successful, we skip it now if ! git_is_branch_merged_into "$BRANCH" "$MASTER_BRANCH"; then - git checkout "$MASTER_BRANCH" || \ + git_do checkout "$MASTER_BRANCH" || \ die "Could not check out $MASTER_BRANCH." if noflag squash; then - git merge --no-ff "$BRANCH" || \ + git_do merge --no-ff "$BRANCH" || \ die "There were merge conflicts." # TODO: What do we do now? else - git merge --squash "$BRANCH" || \ + git_do merge --squash "$BRANCH" || \ die "There were merge conflicts." - git commit + git_do commit fi fi @@ -250,7 +250,7 @@ cmd_finish() { [ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'" [ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'" [ "$FLAGS_messagefile" != "" ] && opts="$opts -F '$FLAGS_messagefile'" - eval git tag $opts "$tagname" "$BRANCH" || \ + eval git_do tag $opts "$tagname" "$BRANCH" || \ die "Tagging failed. Please run finish again to retry." fi fi @@ -259,41 +259,41 @@ cmd_finish() { # in case a previous attempt to finish this release branch has failed, # but the merge into develop was successful, we skip it now if ! git_is_branch_merged_into "$BRANCH" "$DEVELOP_BRANCH"; then - git checkout "$DEVELOP_BRANCH" || \ + git_do checkout "$DEVELOP_BRANCH" || \ die "Could not check out $DEVELOP_BRANCH." # TODO: Actually, accounting for 'git describe' pays, so we should # ideally git merge --no-ff $tagname here, instead! if noflag squash; then - git merge --no-ff "$BRANCH" || \ + git_do merge --no-ff "$BRANCH" || \ die "There were merge conflicts." # TODO: What do we do now? else - git merge --squash "$BRANCH" || \ + git_do merge --squash "$BRANCH" || \ die "There were merge conflicts." # TODO: What do we do now? - git commit + git_do commit fi fi # delete branch if noflag keep; then if [ "$BRANCH" = "$(git_current_branch)" ]; then - git checkout "$MASTER_BRANCH" + git_do checkout "$MASTER_BRANCH" fi - git branch -d "$BRANCH" + git_do branch -d "$BRANCH" fi if flag push; then - git push "$ORIGIN" "$DEVELOP_BRANCH" || \ + git_do push "$ORIGIN" "$DEVELOP_BRANCH" || \ die "Could not push to $DEVELOP_BRANCH from $ORIGIN." - git push "$ORIGIN" "$MASTER_BRANCH" || \ + git_do push "$ORIGIN" "$MASTER_BRANCH" || \ die "Could not push to $MASTER_BRANCH from $ORIGIN." if noflag notag; then - git push --tags "$ORIGIN" || \ + git_do push --tags "$ORIGIN" || \ die "Could not push tags to $ORIGIN." fi - git push "$ORIGIN" :"$BRANCH" || \ + git_do push "$ORIGIN" :"$BRANCH" || \ die "Could not delete the remote $BRANCH in $ORIGIN." fi @@ -324,17 +324,17 @@ cmd_publish() { # sanity checks require_clean_working_tree require_branch "$BRANCH" - git fetch -q "$ORIGIN" + git_do fetch -q "$ORIGIN" require_branch_absent "$ORIGIN/$BRANCH" # create remote branch - git push "$ORIGIN" "$BRANCH:refs/heads/$BRANCH" - git fetch -q "$ORIGIN" + git_do push "$ORIGIN" "$BRANCH:refs/heads/$BRANCH" + git_do fetch -q "$ORIGIN" # configure remote tracking - git config "branch.$BRANCH.remote" "$ORIGIN" - git config "branch.$BRANCH.merge" "refs/heads/$BRANCH" - git checkout "$BRANCH" + git_do config "branch.$BRANCH.remote" "$ORIGIN" + git_do config "branch.$BRANCH.merge" "refs/heads/$BRANCH" + git_do checkout "$BRANCH" echo echo "Summary of actions:" @@ -351,11 +351,11 @@ cmd_track() { # sanity checks require_clean_working_tree require_branch_absent "$BRANCH" - git fetch -q "$ORIGIN" + git_do fetch -q "$ORIGIN" require_branch "$ORIGIN/$BRANCH" # create tracking branch - git checkout -b "$BRANCH" "$ORIGIN/$BRANCH" + git_do checkout -b "$BRANCH" "$ORIGIN/$BRANCH" echo echo "Summary of actions:" diff --git a/git-flow-support b/git-flow-support index ba4d92f2f..cdbfc717c 100644 --- a/git-flow-support +++ b/git-flow-support @@ -169,12 +169,12 @@ cmd_start() { # fetch remote changes if flag fetch; then - git fetch -q "$ORIGIN" "$BASE" + git_do fetch -q "$ORIGIN" "$BASE" fi require_branch_absent "$BRANCH" # create branch - git checkout -b "$BRANCH" "$BASE" + git_do checkout -b "$BRANCH" "$BASE" echo echo "Summary of actions:" From 550a5e3f5c6c6d49b4e537e28963efa60e5dd6cb Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Tue, 14 Oct 2025 10:54:29 +0200 Subject: [PATCH 50/51] Announce git-flow-next --- README.mdown | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.mdown b/README.mdown index a01079b4b..cadd71ab7 100644 --- a/README.mdown +++ b/README.mdown @@ -1,3 +1,34 @@ +> [!IMPORTANT] +> +> # ⚠️ git-flow has moved to git-flow-next! +> +> **This repository is no longer maintained.** The wonderful team at [Tower](https://www.git-tower.com/) has created [**git-flow-next**](https://git-flow.sh) — a modern, fully customizable evolution of git-flow, built on a generic branch dependency model. It’s fully backward compatible with git-flow, open source, and actively maintained. +> +> ### Get started with git-flow-next: +> +> - **Website:** https://git-flow.sh +> - **GitHub:** https://github.com/gittower/git-flow-next +> - **Evolution Story:** Read about the journey from git-flow → git-flow-avh → git-flow-next in [their blog post](https://git-flow.sh/blog) +> +> ### Why git-flow-next? +> +> git-flow-next builds upon the foundation laid by the original git-flow, offering: +> +> - Full customization of branch names and workflow +> - Modern implementation with active maintenance +> - Backward compatibility with existing git-flow workflows +> - Upcoming features like stacked branches and topic branch syncing +> +> ### Thank you ❤️ +> +> To everyone who has used, contributed to, and supported git-flow over the past 15+ years — thank you! Your feedback, contributions, and adoption made git-flow one of the most widely-used Git workflow tools. Special thanks to Peter van der Does for maintaining git-flow-avh, and to the folks at Tower for carrying the torch forward with git-flow-next. + +--- + +(Below, you’ll find the original documentation for historical reference.) + +--- + git-flow ======== From d2eee63886e23c27a0c0418603c8264276a86340 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Tue, 14 Oct 2025 11:12:50 +0200 Subject: [PATCH 51/51] Clean up README by removing outdated sections --- README.mdown | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/README.mdown b/README.mdown index cadd71ab7..b720b125e 100644 --- a/README.mdown +++ b/README.mdown @@ -71,37 +71,6 @@ See the [FAQ](http://github.com/nvie/gitflow/wiki/FAQ) section of the project Wiki. -Please help out ---------------- -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 -feedback. - -Feel free to fork this repo and to commit your additions. For a list of all -contributors, please see the [AUTHORS](AUTHORS) file. - -Any questions, tips, or general discussion can be posted to our Google group: -[http://groups.google.com/group/gitflow-users](http://groups.google.com/group/gitflow-users) - -Contributing ------------- -Fork the repository. Then, run: - - git clone --recursive git@github.com:/gitflow.git - cd gitflow - git branch master origin/master - git flow init -d - git flow feature start - -Then, do work and commit your changes. **Hint**: ``export PATH=`pwd`:$PATH`` -from within the gitflow directory makes sure you're using the version of -gitflow you're currently developing. - - git flow feature publish - -When done, open a pull request to your feature branch. - License terms ------------- git-flow is published under the liberal terms of the BSD License, see the @@ -162,18 +131,3 @@ The ``-d`` flag will accept all defaults. git flow support start For support branches, the `` arg must be a commit on `master`. - - -Showing your appreciation -========================= -A few people already requested it, so now it's here: a Flattr button. - -Of course, the best way to show your appreciation for the original -[blog post](http://nvie.com/posts/a-successful-git-branching-model/) or the git-flow tool itself remains -contributing to the community. If you'd like to show your appreciation in -another way, however, consider Flattr'ing me: - -[![Flattr this][2]][1] - -[1]: http://flattr.com/thing/53771/git-flow -[2]: http://api.flattr.com/button/button-static-50x60.png