├── .gitattributes ├── .editorconfig ├── .mailmap ├── hooks ├── filter-flow-hotfix-finish-tag-message ├── filter-flow-release-branch-tag-message ├── filter-flow-release-finish-tag-message ├── post-flow-bugfix-track ├── post-flow-bugfix-finish ├── post-flow-bugfix-publish ├── post-flow-bugfix-pull ├── post-flow-feature-finish ├── post-flow-feature-track ├── post-flow-feature-publish ├── post-flow-feature-pull ├── post-flow-release-publish ├── post-flow-release-track ├── filter-flow-hotfix-start-version ├── post-flow-bugfix-delete ├── post-flow-feature-delete ├── post-flow-hotfix-delete ├── post-flow-hotfix-finish ├── post-flow-hotfix-publish ├── post-flow-release-branch ├── post-flow-release-delete ├── post-flow-release-finish ├── filter-flow-release-start-version ├── pre-flow-feature-track ├── post-flow-bugfix-start ├── pre-flow-feature-finish ├── pre-flow-feature-publish ├── pre-flow-feature-pull ├── post-flow-feature-start ├── pre-flow-release-publish ├── pre-flow-release-track ├── pre-flow-hotfix-delete ├── pre-flow-hotfix-finish ├── post-flow-hotfix-start ├── pre-flow-feature-delete ├── pre-flow-hotfix-publish ├── pre-flow-release-branch ├── pre-flow-release-delete ├── pre-flow-release-finish ├── post-flow-release-start ├── pre-flow-feature-start ├── pre-flow-hotfix-start └── pre-flow-release-start ├── AUTHORS ├── contrib ├── msysgit-install.cmd └── gitflow-installer.sh ├── git-flow-version ├── Makefile ├── git-flow-log ├── git-flow ├── git-flow-support ├── README.md ├── git-flow-config ├── git-flow-init ├── gitflow-common ├── CHANGELOG.md ├── git-flow-hotfix ├── git-flow-bugfix └── git-flow-feature /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | 3 | *.awk text eol=lf 4 | *.sed text eol=lf 5 | *.sh text eol=lf 6 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This is the top-most .editorconfig file; do not search in parent directories. 2 | root = true 3 | 4 | [*] 5 | end_of_line = LF 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | 9 | [Changes.mdown] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [*.mdown] 14 | trim_trailing_whitespace = false 15 | 16 | [{Makefile, makefile, GNUmakefile}] 17 | indent_style = tab 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | # 2 | # This list is used by git-shortlog to fix a few botched names in the 3 | # git-flow repo, either because the author's full name was messed up and/or 4 | # not always written the same way, making contributions from the same person 5 | # appearing not to be so. 6 | # 7 | 8 | Eric Holmes 9 | Eric J. Holmes 10 | Stefan Näwe 11 | Stefan Näwe 12 | -------------------------------------------------------------------------------- /hooks/filter-flow-hotfix-finish-tag-message: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs during git flow hotfix finish and a tag message is given 4 | # 5 | # Positional arguments: 6 | # $1 Message 7 | # $2 Full version 8 | # 9 | # Return MESSAGE 10 | # 11 | # The following variables are available as they are exported by git-flow: 12 | # 13 | # MASTER_BRANCH - The branch defined as Master 14 | # DEVELOP_BRANCH - The branch defined as Develop 15 | # 16 | MESSAGE="$1" 17 | 18 | # Implement your script here. 19 | 20 | # Return the MESSAGE 21 | echo "${MESSAGE}" 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/filter-flow-release-branch-tag-message: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs during git flow release branch and a tag message is given 4 | # 5 | # Positional arguments: 6 | # $1 Message 7 | # $2 Full version 8 | # 9 | # Return MESSAGE 10 | # 11 | # The following variables are available as they are exported by git-flow: 12 | # 13 | # MASTER_BRANCH - The branch defined as Master 14 | # DEVELOP_BRANCH - The branch defined as Develop 15 | # 16 | MESSAGE="$1" 17 | 18 | # Implement your script here. 19 | 20 | # Return the MESSAGE 21 | echo "${MESSAGE}" 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/filter-flow-release-finish-tag-message: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs during git flow release finish and a tag message is given 4 | # 5 | # Positional arguments: 6 | # $1 Message 7 | # $2 Full version 8 | # 9 | # Return MESSAGE 10 | # 11 | # The following variables are available as they are exported by git-flow: 12 | # 13 | # MASTER_BRANCH - The branch defined as Master 14 | # DEVELOP_BRANCH - The branch defined as Develop 15 | # 16 | MESSAGE="$1" 17 | 18 | # Implement your script here. 19 | 20 | # Return the MESSAGE 21 | echo "${MESSAGE}" 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/post-flow-bugfix-track: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow bugfix track 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the bugfix prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | NAME=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-bugfix-finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow bugfix finish 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the bugfix prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | NAME=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-bugfix-publish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow bugfix publish 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the bugfix prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | NAME=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-bugfix-pull: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow bugfix pull. 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The remote to pull from 8 | # $3 The full branch name (including the bugfix prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | NAME=$1 16 | REMOTE=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-feature-finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow feature finish 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | NAME=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-feature-track: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow feature track 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | NAME=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-feature-publish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow feature publish 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | NAME=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-feature-pull: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow feature pull. 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The remote to pull from 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | NAME=$1 16 | REMOTE=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-release-publish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow release publish 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the release prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-release-track: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow release track 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the release prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/filter-flow-hotfix-start-version: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs during git flow hotfix start 4 | # 5 | # Positional arguments: 6 | # $1 Version 7 | # 8 | # Return VERSION - When VERSION is returned empty, git-flow will stop as the 9 | # version is necessary 10 | # 11 | # The following variables are available as they are exported by git-flow: 12 | # 13 | # MASTER_BRANCH - The branch defined as Master 14 | # DEVELOP_BRANCH - The branch defined as Develop 15 | 16 | VERSION=$1 17 | 18 | # Implement your script here. 19 | 20 | # Return the VERSION 21 | echo ${VERSION} 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/post-flow-bugfix-delete: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow bugfix delete 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the bugfix prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-feature-delete: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow feature delete 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-hotfix-delete: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow hotfix delete 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-hotfix-finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow hotfix finish 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-hotfix-publish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow hotfix publish 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-release-branch: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow release branch 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the release prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-release-delete: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow release delete 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the release prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/post-flow-release-finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow release finish 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the release prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | exit 0 22 | -------------------------------------------------------------------------------- /hooks/filter-flow-release-start-version: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs during git flow release start 4 | # 5 | # Positional arguments: 6 | # $1 Version 7 | # 8 | # Return VERSION - When VERSION is returned empty, git-flow will stop as the 9 | # version is necessary 10 | # 11 | # The following variables are available as they are exported by git-flow: 12 | # 13 | # MASTER_BRANCH - The branch defined as Master 14 | # DEVELOP_BRANCH - The branch defined as Develop 15 | # 16 | VERSION=$1 17 | 18 | # Implement your script here. 19 | 20 | # Return the VERSION 21 | echo ${VERSION} 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/pre-flow-feature-track: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow feature track 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | NAME=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | # To terminate the git-flow action, return a non-zero exit code. 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/post-flow-bugfix-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow bugfix start 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the bugfix prefix) 9 | # $4 The base from which this bugfix is started 10 | # 11 | # The following variables are available as they are exported by git-flow: 12 | # 13 | # MASTER_BRANCH - The branch defined as Master 14 | # DEVELOP_BRANCH - The branch defined as Develop 15 | # 16 | NAME=$1 17 | ORIGIN=$2 18 | BRANCH=$3 19 | BASE=$4 20 | 21 | # Implement your script here. 22 | 23 | exit 0 24 | -------------------------------------------------------------------------------- /hooks/pre-flow-feature-finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow feature finish 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | NAME=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | # To terminate the git-flow action, return a non-zero exit code. 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/pre-flow-feature-publish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow feature publish 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | NAME=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | # To terminate the git-flow action, return a non-zero exit code. 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/pre-flow-feature-pull: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow feature pull. 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The remote to pull from 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | NAME=$1 16 | REMOTE=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | # To terminate the git-flow action, return a non-zero exit code. 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/post-flow-feature-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow feature start 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # $4 The base from which this feature is started 10 | # 11 | # The following variables are available as they are exported by git-flow: 12 | # 13 | # MASTER_BRANCH - The branch defined as Master 14 | # DEVELOP_BRANCH - The branch defined as Develop 15 | # 16 | NAME=$1 17 | ORIGIN=$2 18 | BRANCH=$3 19 | BASE=$4 20 | 21 | # Implement your script here. 22 | 23 | exit 0 24 | -------------------------------------------------------------------------------- /hooks/pre-flow-release-publish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow release publish 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the release prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | # To terminate the git-flow action, return a non-zero exit code. 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/pre-flow-release-track: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow release track 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the release prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | 16 | VERSION=$1 17 | ORIGIN=$2 18 | BRANCH=$3 19 | 20 | # Implement your script here. 21 | 22 | # To terminate the git-flow action, return a non-zero exit code. 23 | exit 0 24 | -------------------------------------------------------------------------------- /hooks/pre-flow-hotfix-delete: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow hotfix delete 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | # To terminate the git-flow action, return a non-zero exit code. 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/pre-flow-hotfix-finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow hotfix finish 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | # To terminate the git-flow action, return a non-zero exit code. 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/post-flow-hotfix-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow hotfix start 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # $4 The base from which this feature is started 10 | # 11 | # The following variables are available as they are exported by git-flow: 12 | # 13 | # MASTER_BRANCH - The branch defined as Master 14 | # DEVELOP_BRANCH - The branch defined as Develop 15 | # 16 | VERSION=$1 17 | ORIGIN=$2 18 | BRANCH=$3 19 | BASE=$4 20 | 21 | # Implement your script here. 22 | 23 | exit 0 24 | -------------------------------------------------------------------------------- /hooks/pre-flow-feature-delete: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow feature delete 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | # To terminate the git-flow action, return a non-zero exit code. 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/pre-flow-hotfix-publish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow hotfix publish 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | # To terminate the git-flow action, return a non-zero exit code. 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/pre-flow-release-branch: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow release branch 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the release prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | # To terminate the git-flow action, return a non-zero exit code. 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/pre-flow-release-delete: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow release delete 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the release prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | # To terminate the git-flow action, return a non-zero exit code. 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/pre-flow-release-finish: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow release finish 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the release prefix) 9 | # 10 | # The following variables are available as they are exported by git-flow: 11 | # 12 | # MASTER_BRANCH - The branch defined as Master 13 | # DEVELOP_BRANCH - The branch defined as Develop 14 | # 15 | VERSION=$1 16 | ORIGIN=$2 17 | BRANCH=$3 18 | 19 | # Implement your script here. 20 | 21 | # To terminate the git-flow action, return a non-zero exit code. 22 | exit 0 23 | -------------------------------------------------------------------------------- /hooks/post-flow-release-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs at the end of git flow release start 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the release prefix) 9 | # $4 The base from which this release is started 10 | # 11 | # The following variables are available as they are exported by git-flow: 12 | # 13 | # MASTER_BRANCH - The branch defined as Master 14 | # DEVELOP_BRANCH - The branch defined as Develop 15 | # 16 | VERSION=$1 17 | ORIGIN=$2 18 | BRANCH=$3 19 | BASE=$4 20 | 21 | # Implement your script here. 22 | 23 | exit 0 24 | -------------------------------------------------------------------------------- /hooks/pre-flow-feature-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow feature start 4 | # 5 | # Positional arguments: 6 | # $1 The friendly name of the branch 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # $4 The base from which this feature is started 10 | # 11 | # The following variables are available as they are exported by git-flow: 12 | # 13 | # MASTER_BRANCH - The branch defined as Master 14 | # DEVELOP_BRANCH - The branch defined as Develop 15 | # 16 | NAME=$1 17 | ORIGIN=$2 18 | BRANCH=$3 19 | BASE=$4 20 | 21 | # Implement your script here. 22 | 23 | # To terminate the git-flow action, return a non-zero exit code. 24 | exit 0 25 | -------------------------------------------------------------------------------- /hooks/pre-flow-hotfix-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow hotfix start 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the feature prefix) 9 | # $4 The base from which this feature is started 10 | # 11 | # The following variables are available as they are exported by git-flow: 12 | # 13 | # MASTER_BRANCH - The branch defined as Master 14 | # DEVELOP_BRANCH - The branch defined as Develop 15 | # 16 | VERSION=$1 17 | ORIGIN=$2 18 | BRANCH=$3 19 | BASE=$4 20 | 21 | # Implement your script here. 22 | 23 | # To terminate the git-flow action, return a non-zero exit code. 24 | exit 0 25 | -------------------------------------------------------------------------------- /hooks/pre-flow-release-start: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs before git flow release start 4 | # 5 | # Positional arguments: 6 | # $1 The version (including the version prefix) 7 | # $2 The origin remote 8 | # $3 The full branch name (including the release prefix) 9 | # $4 The base from which this release is started 10 | # 11 | # The following variables are available as they are exported by git-flow: 12 | # 13 | # MASTER_BRANCH - The branch defined as Master 14 | # DEVELOP_BRANCH - The branch defined as Develop 15 | # 16 | VERSION=$1 17 | ORIGIN=$2 18 | BRANCH=$3 19 | BASE=$4 20 | 21 | # Implement your script here. 22 | 23 | # To terminate the git-flow action, return a non-zero exit code. 24 | exit 0 25 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | git-flow AVH Authors 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | and logs, available at 6 | http://github.com/petervanderdoes/gitflow. 7 | 8 | 9 | Peter van der Does 10 | Vincent Driessen 11 | Daniel Dehennin 12 | Benedikt Böhm 13 | Leonid Komarovsky 14 | Felipe Talavera 15 | Randy Merrill 16 | Kevin Woo 17 | Daniel Truemper 18 | Eric J. Holmes 19 | Fred Condo 20 | Alexandre Dutra 21 | Andreas Heiduk 22 | Ben Loveridge 23 | Florian Gamböck 24 | Gergely Nagy 25 | JP Toto 26 | Kiall Mac Innes 27 | Lorin Hochstein 28 | Olivier Mengué 29 | Oppodelldog 30 | Stefan Näwe 31 | Adam Gibbins 32 | Alexander Groß 33 | Alexander Norström 34 | Alexander Zeitler 35 | Brian St. Pierre 36 | Cararus Eugeniu 37 | Chad Walker 38 | Craig Fowler 39 | Emre Berge Ergenekon 40 | Gregor A. Cieslak 41 | Gruen Christian-Rolf (Kiki) 42 | Guillaume-Jean Herbiet 43 | James Moran 44 | Jannis Leidel 45 | Jason L. Shiffer 46 | Jean Jordaan 47 | Jelte Fennema 48 | Joe Ebmeier 49 | John Sivak 50 | Jon Bernard 51 | Joseph A. Levin 52 | Joshua P. Tilles 53 | Juan Rial 54 | Justin Penney 55 | Konstantin Tjuterev 56 | Kridsada Thanabulpong 57 | Leonardo Giordani 58 | Luis Fernando Gomes @luiscoms 59 | Mark Borcherding 60 | Mark Derricutt 61 | Mateusz Kaczmarek 62 | Matias Hernan Lauriti 63 | Mayerber Carvalho Neto 64 | Nowell Strite 65 | Opher Vishnia 66 | Peter Schröder 67 | Pokey Rule 68 | Stefan Schüßler 69 | Steffen Jaeckel 70 | Steve Mao 71 | Steve Streeting 72 | Tacit Sawk 73 | Vedang Manerikar 74 | Zheeeng 75 | eddie cianci 76 | gmallard 77 | gpongelli 78 | raybec 79 | 80 | 81 | Portions of the project are derived from other open source works are clearly 82 | marked. 83 | 84 | This file is auto generated, any changes will be lost. 85 | -------------------------------------------------------------------------------- /contrib/msysgit-install.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | setlocal 3 | if not "%~1"=="" set GIT_HOME=%~f1 4 | if "%GIT_HOME%"=="" call :FindGitHome "git.cmd" 5 | 6 | if exist "%GIT_HOME%" goto :GitHomeOK 7 | 8 | echo MsysGit installation directory not found.>&2 9 | echo Try to give the directory name on the command line:>&2 10 | echo %0 "%ProgramFiles%\Git" 11 | endlocal 12 | exit /B 1 13 | 14 | :GitHomeOK 15 | set ERR=0 16 | 17 | echo Installing gitflow into "%GIT_HOME%"... 18 | 19 | call :ChkGetopt getopt.exe || set ERR=1 20 | if %ERR%==1 goto :End 21 | echo getopt.exe... Found 22 | 23 | if not exist "%GIT_HOME%\bin\git-flow" goto :Install 24 | echo GitFlow is already installed.>&2 25 | set /p mychoice="Do you want to replace it [y/n]" 26 | if "%mychoice%"=="y" goto :DeleteOldFiles 27 | goto :Abort 28 | 29 | :DeleteOldFiles 30 | echo Deleting old files... 31 | for /F %%i in ("%GIT_HOME%\git-flow*" "%GIT_HOME%\gitflow-*") do if exist "%%~fi" del /F /Q "%%~fi" 32 | 33 | :Install 34 | echo Copying files... 35 | ::goto :EOF 36 | xcopy "%~dp0\..\git-flow" "%GIT_HOME%\bin" /Y /R /F 37 | if errorlevel 4 if not errorlevel 5 goto :AccessDenied 38 | if errorlevel 1 set ERR=1 39 | xcopy "%~dp0\..\git-flow*" "%GIT_HOME%\bin" /Y /R /F || set ERR=1 40 | xcopy "%~dp0\..\gitflow-*" "%GIT_HOME%\bin" /Y /R /F || set ERR=1 41 | 42 | if %ERR%==1 choice /T 30 /C Y /D Y /M "Some unexpected errors happened. Sorry, you'll have to fix them by yourself." 43 | 44 | :End 45 | endlocal & exit /B %ERR% 46 | goto :EOF 47 | 48 | :AccessDenied 49 | set ERR=1 50 | echo. 51 | echo You should run this script with "Full Administrator" rights:>&2 52 | echo - Right-click with Shift on the script from the Explorer>&2 53 | echo - Select "Run as administrator">&2 54 | choice /T 30 /C YN /D Y /N >nul 55 | goto :End 56 | 57 | :Abort 58 | echo Installation canceled.>&2 59 | set ERR=1 60 | goto :End 61 | 62 | :ChkGetopt 63 | :: %1 is getopt.exe 64 | if exist "%GIT_HOME%\bin\%1" goto :EOF 65 | if exist "%~f$PATH:1" goto :EOF 66 | echo %GIT_HOME%\bin\%1 not found.>&2 67 | echo You have to install this file manually. See the GitFlow README. 68 | exit /B 1 69 | 70 | :FindGitHome 71 | setlocal 72 | set GIT_CMD_DIR=%~dp$PATH:1 73 | if "%GIT_CMD_DIR%"=="" endlocal & goto :EOF 74 | endlocal & set GIT_HOME=%GIT_CMD_DIR:~0,-5% 75 | goto :EOF 76 | -------------------------------------------------------------------------------- /git-flow-version: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # vim:et:ft=sh:sts=2:sw=2 3 | # 4 | # git-flow -- A collection of Git extensions to provide high-level 5 | # repository operations for Vincent Driessen's branching model. 6 | # 7 | # A blog post presenting this model is found at: 8 | # http://blog.avirtualhome.com/development-workflow-using-git/ 9 | # 10 | # Feel free to contribute to this project at: 11 | # http://github.com/petervanderdoes/gitflow 12 | # 13 | # Authors: 14 | # Copyright 2012-2019 Peter van der Does. All rights reserved. 15 | # 16 | # Original Author: 17 | # Copyright 2010 Vincent Driessen. All rights reserved. 18 | # 19 | # Redistribution and use in source and binary forms, with or without 20 | # modification, are permitted provided that the following conditions are met: 21 | # 22 | # 1. Redistributions of source code must retain the above copyright notice, this 23 | # list of conditions and the following disclaimer. 24 | # 2. Redistributions in binary form must reproduce the above copyright notice, 25 | # this list of conditions and the following disclaimer in the documentation 26 | # and/or other materials provided with the distribution. 27 | # 28 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 29 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 31 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 32 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 33 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 34 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 35 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 36 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 37 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | # 39 | 40 | GITFLOW_VERSION=1.12.4-dev0 41 | 42 | initialize() { 43 | # A function can not be empty. Comments count as empty. 44 | local FOO='' 45 | } 46 | 47 | usage() { 48 | OPTIONS_SPEC="\ 49 | git flow version 50 | 51 | Shows version information. 52 | 53 | For more specific help type the command followed by --help 54 | -- 55 | " 56 | flags_help 57 | } 58 | 59 | cmd_default() { 60 | echo "$GITFLOW_VERSION (AVH Edition)" 61 | } 62 | 63 | cmd_help() { 64 | usage 65 | exit 0 66 | } 67 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Authors: 3 | # Copyright 2012-2019 Peter van der Does. All rights reserved. 4 | # 5 | # Original Author: 6 | # Copyright 2010 Vincent Driessen. All rights reserved. 7 | # 8 | # Redistribution and use in source and binary forms, with or without 9 | # modification, are permitted provided that the following conditions are met: 10 | # 11 | # 1. Redistributions of source code must retain the above copyright notice, this 12 | # list of conditions and the following disclaimer. 13 | # 2. Redistributions in binary form must reproduce the above copyright notice, 14 | # this list of conditions and the following disclaimer in the documentation 15 | # and/or other materials provided with the distribution. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 18 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 19 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 20 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 21 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 22 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # 28 | 29 | prefix=/usr/local 30 | 31 | datarootdir=$(prefix)/share 32 | docdir=$(datarootdir)/doc/gitflow 33 | # files that need mode 755 34 | EXEC_FILES=git-flow 35 | 36 | # files that need mode 644 37 | SCRIPT_FILES =git-flow-init 38 | SCRIPT_FILES+=git-flow-feature 39 | SCRIPT_FILES+=git-flow-bugfix 40 | SCRIPT_FILES+=git-flow-hotfix 41 | SCRIPT_FILES+=git-flow-release 42 | SCRIPT_FILES+=git-flow-support 43 | SCRIPT_FILES+=git-flow-version 44 | SCRIPT_FILES+=git-flow-log 45 | SCRIPT_FILES+=git-flow-config 46 | SCRIPT_FILES+=gitflow-common 47 | SCRIPT_FILES+=gitflow-shFlags 48 | 49 | # Hook files 50 | HOOK_FILES=$(wildcard hooks/*) 51 | 52 | all: 53 | @echo "usage: make install" 54 | @echo " make uninstall" 55 | 56 | install: 57 | install -d -m 0755 $(prefix)/bin 58 | install -d -m 0755 $(docdir)/hooks 59 | install -m 0755 $(EXEC_FILES) $(prefix)/bin 60 | install -m 0644 $(SCRIPT_FILES) $(prefix)/bin 61 | install -m 0644 $(HOOK_FILES) $(docdir)/hooks 62 | 63 | uninstall: 64 | test -d $(prefix)/bin && \ 65 | cd $(prefix)/bin && \ 66 | rm -f $(EXEC_FILES) $(SCRIPT_FILES) 67 | test -d $(docdir) && \ 68 | rm -rf $(docdir) 69 | -------------------------------------------------------------------------------- /contrib/gitflow-installer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # git-flow make-less installer for *nix systems, by Rick Osborne 4 | # Based on the git-flow core Makefile: 5 | # http://github.com/petervanderdoes/gitflow-avh/blob/master/Makefile 6 | 7 | # Licensed under the same restrictions as git-flow: 8 | # http://github.com/petervanderdoes/gitflow-avh/blob/develop/LICENSE 9 | 10 | # Updated for the fork at petervanderdoes 11 | 12 | usage() { 13 | echo "Usage: [environment] gitflow-installer.sh [install|uninstall] [stable|develop|version] [tag]" 14 | echo "Environment:" 15 | echo " PREFIX=$PREFIX" 16 | echo " REPO_HOME=$REPO_HOME" 17 | echo " REPO_NAME=$REPO_NAME" 18 | exit 1 19 | } 20 | 21 | # Does this need to be smarter for each host OS? 22 | if [ -z "$PREFIX" ] ; then 23 | PREFIX="/usr/local" 24 | fi 25 | 26 | if [ -z "$REPO_NAME" ] ; then 27 | REPO_NAME="gitflow" 28 | fi 29 | 30 | if [ -z "$REPO_HOME" ] ; then 31 | REPO_HOME="https://github.com/petervanderdoes/gitflow-avh.git" 32 | fi 33 | 34 | EXEC_PREFIX="$PREFIX" 35 | BINDIR="$EXEC_PREFIX/bin" 36 | DATAROOTDIR="$PREFIX/share" 37 | DOCDIR="$DATAROOTDIR/doc/gitflow" 38 | 39 | EXEC_FILES="git-flow" 40 | SCRIPT_FILES="git-flow-init git-flow-feature git-flow-bugfix git-flow-hotfix git-flow-release git-flow-support git-flow-version gitflow-common gitflow-shFlags git-flow-config" 41 | HOOK_FILES="$REPO_NAME/hooks/*" 42 | 43 | 44 | echo "### git-flow no-make installer ###" 45 | 46 | case "$1" in 47 | uninstall) 48 | echo "Uninstalling git-flow from $PREFIX" 49 | if [ -d "$BINDIR" ] ; then 50 | for script_file in $SCRIPT_FILES $EXEC_FILES ; do 51 | echo "rm -vf $BINDIR/$script_file" 52 | rm -vf "$BINDIR/$script_file" 53 | done 54 | rm -rf "$DOCDIR" 55 | else 56 | echo "The '$BINDIR' directory was not found." 57 | fi 58 | exit 59 | ;; 60 | help) 61 | usage 62 | exit 63 | ;; 64 | install) 65 | if [ -z $2 ]; then 66 | usage 67 | exit 68 | fi 69 | echo "Installing git-flow to $BINDIR" 70 | if [ -d "$REPO_NAME" -a -d "$REPO_NAME/.git" ] ; then 71 | echo "Using existing repo: $REPO_NAME" 72 | else 73 | echo "Cloning repo from GitHub to $REPO_NAME" 74 | git clone "$REPO_HOME" "$REPO_NAME" 75 | fi 76 | cd "$REPO_NAME" 77 | git pull 78 | cd "$OLDPWD" 79 | case "$2" in 80 | stable) 81 | cd "$REPO_NAME" 82 | git checkout master 83 | cd "$OLDPWD" 84 | ;; 85 | develop) 86 | cd "$REPO_NAME" 87 | git checkout develop 88 | cd "$OLDPWD" 89 | ;; 90 | version) 91 | cd "$REPO_NAME" 92 | git checkout tags/$3 93 | cd "$OLDPWD" 94 | ;; 95 | *) 96 | usage 97 | exit 98 | ;; 99 | esac 100 | install -v -d -m 0755 "$PREFIX/bin" 101 | install -v -d -m 0755 "$DOCDIR/hooks" 102 | for exec_file in $EXEC_FILES ; do 103 | install -v -m 0755 "$REPO_NAME/$exec_file" "$BINDIR" 104 | done 105 | for script_file in $SCRIPT_FILES ; do 106 | install -v -m 0644 "$REPO_NAME/$script_file" "$BINDIR" 107 | done 108 | for hook_file in $HOOK_FILES ; do 109 | install -v -m 0644 "$hook_file" "$DOCDIR/hooks" 110 | done 111 | exit 112 | ;; 113 | *) 114 | usage 115 | exit 116 | ;; 117 | esac 118 | -------------------------------------------------------------------------------- /git-flow-log: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # vim:et:ft=sh:sts=2:sw=2 3 | # 4 | # git-flow -- A collection of Git extensions to provide high-level 5 | # repository operations for Vincent Driessen's branching model. 6 | # 7 | # A blog post presenting this model is found at: 8 | # http://blog.avirtualhome.com/development-workflow-using-git/ 9 | # 10 | # Feel free to contribute to this project at: 11 | # http://github.com/petervanderdoes/gitflow 12 | # 13 | # Authors: 14 | # Copyright 2012-2019 Peter van der Does. All rights reserved. 15 | # 16 | # Original Author: 17 | # Copyright 2010 Vincent Driessen. All rights reserved. 18 | # 19 | # Redistribution and use in source and binary forms, with or without 20 | # modification, are permitted provided that the following conditions are met: 21 | # 22 | # 1. Redistributions of source code must retain the above copyright notice, this 23 | # list of conditions and the following disclaimer. 24 | # 2. Redistributions in binary form must reproduce the above copyright notice, 25 | # this list of conditions and the following disclaimer in the documentation 26 | # and/or other materials provided with the distribution. 27 | # 28 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 29 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 31 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 32 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 33 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 34 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 35 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 36 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 37 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | # 39 | 40 | 41 | initialize() { 42 | require_git_repo 43 | require_gitflow_initialized 44 | gitflow_load_settings 45 | } 46 | 47 | usage() { 48 | OPTIONS_SPEC="\ 49 | git flow log 50 | 51 | shows current branch log compared to develop 52 | 'git help log' for arguments 53 | -- 54 | " 55 | flags_help 56 | } 57 | 58 | # Parse arguments and set common variables 59 | parse_args() { 60 | FLAGS "$@" || exit $? 61 | eval set -- "${FLAGS_ARGV}" 62 | } 63 | 64 | cmd_default() { 65 | cmd_list "$@" 66 | } 67 | 68 | cmd_list() { 69 | OPTIONS_SPEC="\ 70 | git flow feature log [] 71 | 72 | Show log on branch since the fork of branch 73 | Options come from git log 74 | -- 75 | h,help! Show this help 76 | showcommands! Show git commands while executing them 77 | " 78 | 79 | # Parse arguments 80 | parse_args "$@" 81 | 82 | # get base branch from current branch 83 | local base=$(gitflow_config_get_base_branch $(git_current_branch)) 84 | 85 | # no base branch found, comparing against $master 86 | if [ -z $base ]; then 87 | base=$MASTER_BRANCH 88 | fi 89 | 90 | # Get the log 91 | echo "Comparing against \"$base\" branch\n" 92 | git_do log "$@""$base.." 93 | } 94 | 95 | cmd_help() { 96 | usage 97 | exit 0 98 | } 99 | -------------------------------------------------------------------------------- /git-flow: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # git-flow -- A collection of Git extensions to provide high-level 4 | # repository operations for Vincent Driessen's branching model. 5 | # 6 | # A blog post presenting this model is found at: 7 | # http://blog.avirtualhome.com/development-workflow-using-git/ 8 | # 9 | # Feel free to contribute to this project at: 10 | # http://github.com/petervanderdoes/gitflow 11 | # 12 | # Authors: 13 | # Copyright 2012-2019 Peter van der Does. All rights reserved. 14 | # 15 | # Original Author: 16 | # Copyright 2010 Vincent Driessen. All rights reserved. 17 | # 18 | # Redistribution and use in source and binary forms, with or without 19 | # modification, are permitted provided that the following conditions are met: 20 | # 21 | # 1. Redistributions of source code must retain the above copyright notice, this 22 | # list of conditions and the following disclaimer. 23 | # 2. Redistributions in binary form must reproduce the above copyright notice, 24 | # this list of conditions and the following disclaimer in the documentation 25 | # and/or other materials provided with the distribution. 26 | # 27 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 28 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 29 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 30 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 31 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 32 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 33 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 34 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 36 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 | # 38 | # 39 | # enable debug mode 40 | if [ "$DEBUG" = "yes" ]; then 41 | set -x 42 | fi 43 | 44 | # Setup the GITFLOW_DIR for different operating systems. 45 | # This is mostly to make sure that we get the correct directory when the 46 | # git-flow file is a symbolic link 47 | case $(uname -s) in 48 | Linux) 49 | export GITFLOW_DIR=$(dirname "$(readlink -e "$0")") 50 | ;; 51 | FreeBSD|OpenBSD|NetBSD) 52 | export FLAGS_GETOPT_CMD='/usr/local/bin/getopt' 53 | export GITFLOW_DIR=$(dirname "$(realpath "$0")") 54 | ;; 55 | Darwin) 56 | PRG="$0" 57 | while [ -h "$PRG" ]; do 58 | link=$(readlink "$PRG") 59 | if expr "$link" : '/.*' > /dev/null; then 60 | PRG="$link" 61 | else 62 | PRG="$(dirname "$PRG")/$link" 63 | fi 64 | done 65 | export GITFLOW_DIR=$(dirname "$PRG") 66 | ;; 67 | *MINGW*) 68 | export GITFLOW_DIR=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 69 | pwd () { 70 | builtin pwd -W 71 | } 72 | ;; 73 | *) 74 | # The sed expression here replaces all backslashes by forward slashes. 75 | # This helps our Windows users, while not bothering our Unix users.) 76 | export GITFLOW_DIR=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") 77 | ;; 78 | esac 79 | 80 | # Extra environment settings 81 | if [ -f ~/.gitflow_export ]; then 82 | if grep -E 'GITFLOW_FLAG_(SHOWCOMMANDS|INIT|FEATURE|HOTFIX|RELEASE|SUPPORT)' ~/.gitflow_export > /dev/null; then 83 | echo "Using environment variables for \"showcommands\", \"init\", \"feature\", \"hotfix\", \"release\" and \"support\" in ~/.gitflow_export has deprecated, use git config instead." 84 | echo "" 85 | exit 1; 86 | else 87 | . ~/.gitflow_export 88 | fi 89 | fi 90 | 91 | usage() { 92 | echo "usage: git flow " 93 | echo 94 | echo "Available subcommands are:" 95 | echo " init Initialize a new git repo with support for the branching model." 96 | echo " feature Manage your feature branches." 97 | echo " bugfix Manage your bugfix branches." 98 | echo " release Manage your release branches." 99 | echo " hotfix Manage your hotfix branches." 100 | echo " support Manage your support branches." 101 | echo " version Shows version information." 102 | echo " config Manage your git-flow configuration." 103 | echo " log Show log deviating from base branch." 104 | echo 105 | echo "Try 'git flow help' for details." 106 | } 107 | 108 | main() { 109 | if [ $# -lt 1 ]; then 110 | usage 111 | exit 1 112 | fi 113 | 114 | # Use the shFlags project to parse the command line arguments 115 | . "$GITFLOW_DIR/gitflow-shFlags" 116 | FLAGS_PARENT="git flow" 117 | 118 | # Load common functionality 119 | . "$GITFLOW_DIR/gitflow-common" 120 | 121 | # allow user to request git action logging 122 | DEFINE_boolean 'showcommands' false 'Show actions taken (git commands)' 123 | # but if the user prefers that the logging is always on, 124 | # use the environmental variables. 125 | gitflow_override_flag_boolean 'showcommands' 'showcommands' 126 | 127 | # Sanity checks 128 | SUBCOMMAND="$1"; shift 129 | if [ "${SUBCOMMAND}" = "finish" ] || [ "${SUBCOMMAND}" = "delete" ] || [ "${SUBCOMMAND}" = "publish" ] || [ "${SUBCOMMAND}" = "rebase" ]; then 130 | _current_branch=$(git_current_branch) 131 | if gitflow_is_prefixed_branch "${_current_branch}"; then 132 | if startswith "${_current_branch}" $(git config --get gitflow.prefix.feature); then 133 | SUBACTION="${SUBCOMMAND}" 134 | SUBCOMMAND="feature" 135 | _prefix=$(git config --get gitflow.prefix.feature) 136 | _short_branch_name=$(echo ${_current_branch#*${_prefix}}) 137 | else 138 | if startswith "${_current_branch}" $(git config --get gitflow.prefix.bugfix); then 139 | SUBACTION="${SUBCOMMAND}" 140 | SUBCOMMAND="bugfix" 141 | _prefix=$(git config --get gitflow.prefix.bugfix) 142 | _short_branch_name=$(echo ${_current_branch#*${_prefix}}) 143 | else 144 | if startswith "${_current_branch}" $(git config --get gitflow.prefix.hotfix); then 145 | SUBACTION="${SUBCOMMAND}" 146 | SUBCOMMAND="hotfix" 147 | _prefix=$(git config --get gitflow.prefix.hotfix) 148 | _short_branch_name=$(echo ${_current_branch#*${_prefix}}) 149 | else 150 | if startswith "${_current_branch}" $(git config --get gitflow.prefix.release); then 151 | SUBACTION="${SUBCOMMAND}" 152 | SUBCOMMAND="release" 153 | _prefix=$(git config --get gitflow.prefix.release) 154 | _short_branch_name=$(echo ${_current_branch#*${_prefix}}) 155 | fi 156 | fi 157 | fi 158 | fi 159 | fi 160 | fi 161 | 162 | if [ ! -e "$GITFLOW_DIR/git-flow-$SUBCOMMAND" ]; then 163 | usage 164 | exit 1 165 | fi 166 | 167 | # Run command 168 | . "$GITFLOW_DIR/git-flow-$SUBCOMMAND" 169 | FLAGS_PARENT="git flow $SUBCOMMAND" 170 | 171 | if [ -z "${SUBACTION}" ]; then 172 | # If the first argument is a flag, it starts with '-', we interpret this 173 | # argument as a flag for the default command. 174 | if startswith "$1" "-"; then 175 | SUBACTION="default" 176 | elif [ -z "$1" ]; then 177 | SUBACTION="default" 178 | else 179 | SUBACTION="$1" 180 | shift 181 | # Do not allow direct calls to subactions with an underscore. 182 | if $(contains "$SUBACTION" "_"); then 183 | warn "Unknown subcommand: '$SUBACTION'" 184 | usage 185 | exit 1 186 | fi 187 | # Replace the dash with an underscore as bash doesn't allow a dash 188 | # in the function name. 189 | SUBACTION=$(echo "$SUBACTION" |tr '-' '_') 190 | fi 191 | fi 192 | 193 | if ! type "cmd_$SUBACTION" >/dev/null 2>&1; then 194 | warn "Unknown subcommand: '$SUBACTION'" 195 | usage 196 | exit 1 197 | fi 198 | 199 | # Run the specified action 200 | if [ $SUBACTION != "help" ] && [ $SUBCOMMAND != "init" ]; then 201 | initialize 202 | fi 203 | if [ $SUBACTION != 'default' ]; then 204 | FLAGS_PARENT="git flow $SUBCOMMAND $SUBACTION" 205 | fi 206 | 207 | cmd_$SUBACTION "$@" "${_short_branch_name}" 208 | } 209 | main "$@" 210 | -------------------------------------------------------------------------------- /git-flow-support: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # vim:et:ft=sh:sts=2:sw=2 3 | # 4 | # git-flow -- A collection of Git extensions to provide high-level 5 | # repository operations for Vincent Driessen's branching model. 6 | # 7 | # A blog post presenting this model is found at: 8 | # http://blog.avirtualhome.com/development-workflow-using-git/ 9 | # 10 | # Feel free to contribute to this project at: 11 | # http://github.com/petervanderdoes/gitflow 12 | # 13 | # Authors: 14 | # Copyright 2012-2019 Peter van der Does. All rights reserved. 15 | # 16 | # Original Author: 17 | # Copyright 2010 Vincent Driessen. All rights reserved. 18 | # 19 | # Redistribution and use in source and binary forms, with or without 20 | # modification, are permitted provided that the following conditions are met: 21 | # 22 | # 1. Redistributions of source code must retain the above copyright notice, this 23 | # list of conditions and the following disclaimer. 24 | # 2. Redistributions in binary form must reproduce the above copyright notice, 25 | # this list of conditions and the following disclaimer in the documentation 26 | # and/or other materials provided with the distribution. 27 | # 28 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 29 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 30 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 31 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 32 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 33 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 34 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 35 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 36 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 37 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | # 39 | 40 | initialize() { 41 | require_git_repo 42 | require_gitflow_initialized 43 | git config --get gitflow.prefix.support >/dev/null 2>&1 || die "Support prefix not set. Please run 'git flow init'." 44 | gitflow_load_settings 45 | VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag) 46 | PREFIX=$(git config --get gitflow.prefix.support) 47 | } 48 | 49 | usage() { 50 | OPTIONS_SPEC="\ 51 | git flow support [list] 52 | git flow support start 53 | 54 | Manage your support branches. 55 | 56 | For more specific help type the command followed by --help 57 | -- 58 | " 59 | flags_help 60 | } 61 | 62 | cmd_default() { 63 | cmd_list "$@" 64 | } 65 | 66 | cmd_list() { 67 | OPTIONS_SPEC="\ 68 | git flow support [list] [-h] [-v] 69 | 70 | List all local support branches 71 | -- 72 | h,help! Show this help 73 | v,verbose Verbose (more) output 74 | " 75 | local support_branches current_branch width branch len 76 | local base master_sha branch_sha 77 | local tagname nicename 78 | 79 | # Define flags 80 | DEFINE_boolean 'verbose' false 'verbose (more) output' v 81 | 82 | # Parse arguments 83 | parse_args "$@" 84 | 85 | support_branches=$(git_local_branches_prefixed "$PREFIX") 86 | if [ -z "$support_branches" ]; then 87 | warn "No support branches exist." 88 | warn "" 89 | warn "You can start a new support branch:" 90 | warn "" 91 | warn " git flow support start " 92 | warn "" 93 | exit 0 94 | fi 95 | current_branch=$(git_current_branch) 96 | 97 | # Determine column width first 98 | width=0 99 | for branch in $support_branches; do 100 | len=${#branch} 101 | width=$(max $width $len) 102 | done 103 | width=$(($width+3-${#PREFIX})) 104 | 105 | for branch in $support_branches; do 106 | base=$(git merge-base "$branch" "$MASTER_BRANCH") 107 | master_sha=$(git rev-parse "$MASTER_BRANCH") 108 | branch_sha=$(git rev-parse "$branch") 109 | if [ "$branch" = "$current_branch" ]; then 110 | printf "* " 111 | else 112 | printf " " 113 | fi 114 | if flag verbose; then 115 | printf "%-${width}s" "${branch#$PREFIX}" 116 | if [ "$branch_sha" = "$master_sha" ]; then 117 | printf "(no commits yet)" 118 | else 119 | tagname=$(git name-rev --tags --no-undefined --name-only "$base") 120 | if [ "$tagname" != "" ]; then 121 | nicename=$tagname 122 | else 123 | nicename=$(git rev-parse --short "$base") 124 | fi 125 | printf "(based on $nicename)" 126 | fi 127 | else 128 | printf "%s" "${branch#$PREFIX}" 129 | fi 130 | echo 131 | done 132 | } 133 | 134 | cmd_help() { 135 | usage 136 | exit 0 137 | } 138 | 139 | # Parse arguments and set common variables 140 | parse_args() { 141 | FLAGS "$@" || exit $? 142 | eval set -- "${FLAGS_ARGV}" 143 | 144 | # Read arguments into global variables 145 | if [ -z $1 ]; then 146 | VERSION='' 147 | else 148 | VERSION=$1 149 | fi 150 | 151 | if [ -z $2 ]; then 152 | BASE='' 153 | else 154 | BASE=$2 155 | fi 156 | BRANCH=$PREFIX$VERSION 157 | } 158 | 159 | cmd_start() { 160 | OPTIONS_SPEC="\ 161 | git flow support start [-h] [-F] 162 | 163 | Start a new support branch name based on 164 | -- 165 | h,help! Show this help 166 | showcommands! Show git commands while executing them 167 | F,[no]fetch Fetch from origin before performing finish 168 | " 169 | # Define flags 170 | DEFINE_boolean 'fetch' false "fetch from $ORIGIN before performing finish" F 171 | 172 | # Override defaults with values from config 173 | gitflow_override_flag_boolean "support.start.fetch" "fetch" 174 | 175 | # Parse arguments 176 | parse_args "$@" 177 | 178 | gitflow_require_version_arg 179 | gitflow_require_base_arg 180 | 181 | # Sanity checks 182 | git_config_bool_exists "gitflow.allowdirty" || require_clean_working_tree 183 | 184 | # Fetch remote changes 185 | if flag fetch; then 186 | git_fetch_branch "$ORIGIN" "$BASE" 187 | fi 188 | 189 | git_is_ancestor "$BASE" "$MASTER_BRANCH" || die "Given base '$BASE' is not a valid commit on '$MASTER_BRANCH'." 190 | 191 | require_branch_absent "$BRANCH" 192 | 193 | # Create branch 194 | git_do checkout -b "$BRANCH" "$BASE" || die "Could not create support branch '$BRANCH'." 195 | 196 | echo 197 | echo "Summary of actions:" 198 | echo "- A new branch '$BRANCH' was created, based on '$BASE'" 199 | echo "- You are now on branch '$(git_current_branch)'" 200 | echo 201 | } 202 | 203 | cmd_rebase() { 204 | OPTIONS_SPEC="\ 205 | git flow support rebase [-h] [-i] [-p] [] 206 | 207 | Rebase on 208 | -- 209 | h,help! Show this help 210 | showcommands! Show git commands while executing them 211 | i,[no]interactive Do an interactive rebase 212 | p,[no]preserve-merges Preserve merges 213 | " 214 | local opts 215 | 216 | # Define flags 217 | DEFINE_boolean 'interactive' false 'do an interactive rebase' i 218 | DEFINE_boolean 'preserve-merges' false 'try to recreate merges' p 219 | 220 | # Override defaults with values from config 221 | gitflow_override_flag_boolean "support.rebase.interactive" "interactive" 222 | gitflow_override_flag_boolean "support.rebase.preserve-merges" "preserve_merges" 223 | 224 | # Parse arguments 225 | parse_args "$@" 226 | 227 | # Use current branch if no version is given 228 | if [ "$VERSION" = "" ]; then 229 | gitflow_use_current_branch_version 230 | fi 231 | 232 | BASE_BRANCH=$(gitflow_config_get_base_branch $BRANCH) 233 | BASE_BRANCH=${BASE_BRANCH:-$DEVELOP_BRANCH} 234 | 235 | warn "Will try to rebase '$NAME' which is based on '$BASE_BRANCH'..." 236 | if ! git_config_bool_exists "rebase.autostash"; then 237 | require_clean_working_tree 238 | fi 239 | require_branch "$BRANCH" 240 | 241 | git_local_branch_exists "$BASE_BRANCH" || die "The base '$BASE_BRANCH' doesn't exists locally or is not a branch. Can't rebase the support branch '$BRANCH'." 242 | 243 | git_do checkout -q "$BRANCH" || die "Could not check out branch '$BRANCH'." 244 | if flag interactive; then 245 | opts="$opts -i" 246 | fi 247 | if flag preserve_merges; then 248 | opts="$opts -p" 249 | fi 250 | git_do rebase $opts "$BASE_BRANCH" 251 | } 252 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # git-flow (AVH Edition) 2 | 3 | A collection of Git extensions to provide high-level repository operations 4 | for Vincent Driessen's [branching model](http://nvie.com/git-model "original 5 | blog post"). This fork adds functionality not added to the original branch. 6 | 7 | 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 | * [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) 18 | * [A short introduction to git-flow](http://vimeo.com/16018419) (by Mark Derricutt) 19 | * [On the path with git-flow](https://vimeo.com/codesherpas/on-the-path-gitflow) (by Dave Bock) 20 | 21 | A quick cheatsheet was made by Daniel Kummer: 22 | 23 | [http://danielkummer.github.io/git-flow-cheatsheet/](http://danielkummer.github.io/git-flow-cheatsheet/) 24 | 25 | ## Installing git-flow 26 | 27 | See the Wiki for up-to-date [Installation Instructions](https://github.com/petervanderdoes/gitflow-avh/wiki/Installation). 28 | 29 | 30 | ## Integration with your shell 31 | 32 | For those who use the [Bash](http://www.gnu.org/software/bash/) or [ZSH](http://www.zsh.org) 33 | shell, you can use my [fork of git-flow-completion](https://github.com/petervanderdoes/git-flow-completion) 34 | which includes several additions for git-flow (AVH Edition), or you can use the 35 | original [git-flow-completion](http://github.com/bobthecow/git-flow-completion) 36 | project by [bobthecow](http://github.com/bobthecow). Both offer tab-completion 37 | for git-flow subcommands and branch names with my fork including tab-completion 38 | for the commands not found in the original git-flow. 39 | 40 | 41 | ## FAQ 42 | 43 | * See the [FAQ](http://github.com/petervanderdoes/gitflow-avh/wiki/FAQ) section 44 | of the project Wiki. 45 | * Version Numbering Scheme. 46 | Starting with version 1.0, the project uses the following scheme: 47 | \.\.\\ 48 | * AVH is the acronym of "A VirtualHome" 49 | 50 | ## Please help out 51 | 52 | This project is under constant development. Feedback and suggestions are very 53 | welcome and I encourage you to use the [Issues 54 | list](http://github.com/petervanderdoes/gitflow-avh/issues) on Github to provide that 55 | feedback. 56 | 57 | Feel free to fork this repository and to commit your additions. For a list of 58 | all contributors, please see the [AUTHORS](AUTHORS) file. 59 | 60 | Any questions, tips, or general discussion can be posted to the Google group: 61 | [http://groups.google.com/group/gitflow-users](http://groups.google.com/group/gitflow-users) 62 | This is the original group set up to support the nvie branch, but I am monitoring 63 | the list as well for any questions related to my version. 64 | When you do post a question on the list please indicate which version you are, 65 | using the complete version number. 66 | 67 | ## Contributing 68 | 69 | Fork the repository. Then, run: 70 | 71 | ```shell 72 | git clone -b master git@github.com:/gitflow-avh.git 73 | cd gitflow-avh 74 | ``` 75 | 76 | The `-b master` switch has to be added since the fork operation automatically 77 | clones the `develop` branch of the official gitflow repository and cloning it 78 | results in a local repository with just a `develop` branch. 79 | 80 | If you do not have gitflow installed yet install it by running `make && make install`. 81 | 82 | After that initialize the local gitflow repository with gitflow itself: 83 | 84 | ```shell 85 | git flow init -d 86 | git flow feature start 87 | ``` 88 | 89 | Then, do work and commit your changes. 90 | 91 | ```shell 92 | git flow feature publish 93 | ``` 94 | 95 | When done, open a pull request to your feature branch. 96 | 97 | ## License terms 98 | 99 | git-flow is published under the FreeBSD License, see the 100 | [LICENSE](LICENSE) file. Although the FreeBSD License does not require you to 101 | share any modifications you make to the source code, you are very much 102 | encouraged and invited to contribute back your modifications to the community, 103 | preferably in a Github fork, of course. 104 | 105 | 106 | ## git flow usage 107 | 108 | ### Initialization 109 | 110 | To initialize a new repo with the basic branch structure, use: 111 | 112 | git flow init [-d] 113 | 114 | This will then interactively prompt you with some questions on which branches 115 | you would like to use as development and production branches, and how you 116 | would like your prefixes be named. You may simply press Return on any of 117 | those questions to accept the (sane) default suggestions. 118 | 119 | The ``-d`` flag will accept all defaults. 120 | 121 | ![Screencast git flow init](http://i.imgur.com/lFQbY5V.gif) 122 | 123 | ### Creating feature/release/hotfix/support branches 124 | 125 | * To list/start/finish/delete feature branches, use: 126 | 127 | ```shell 128 | git flow feature 129 | git flow feature start [] 130 | git flow feature finish 131 | git flow feature delete 132 | ``` 133 | 134 | For feature branches, the `` arg must be a branch, when omitted it defaults to the develop branch. 135 | 136 | * To push/pull a feature branch to the remote repository, use: 137 | 138 | ```shell 139 | git flow feature publish 140 | git flow feature track 141 | ``` 142 | 143 | * To list/start/finish/delete release branches, use: 144 | 145 | ```shell 146 | git flow release 147 | git flow release start [] 148 | git flow release finish 149 | git flow release delete 150 | ``` 151 | 152 | For release branches, the `` arg must be a branch, when omitted it defaults to the develop branch. 153 | 154 | * To list/start/finish/delete hotfix branches, use: 155 | 156 | ```shell 157 | git flow hotfix 158 | git flow hotfix start [] 159 | git flow hotfix finish 160 | git flow hotfix delete 161 | ``` 162 | 163 | For hotfix branches, the `` arg must be a branch, when omitted it defaults to the production branch. 164 | 165 | * To list/start support branches, use: 166 | 167 | ```shell 168 | git flow support 169 | git flow support start 170 | ``` 171 | 172 | For support branches, the `` arg must be a branch, when omitted it defaults to the production branch. 173 | 174 | ### Share features with others 175 | 176 | You can easily publish a feature you are working on. The reason can be to allow other programmers to work on it or to access it from another machine. The publish/track feature of gitflow simplify the creation of a remote branch and its tracking. 177 | 178 | When you want to publish a feature just use: 179 | ```shell 180 | git flow feature publish 181 | ``` 182 | 183 | or, if you already are into the `feature/` branch, just issue: 184 | ```shell 185 | git flow feature publish 186 | ``` 187 | 188 | Now if you execute `git branch -avv` you will see that your branch `feature/` tracks `[origin/feature/]`. To track the same remote branch in another clone of the same repository use: 189 | ```shell 190 | git flow feature track 191 | ``` 192 | 193 | This will create a local feature `feature/` that tracks the same remote branch as the original one, that is `origin/feature/`. 194 | 195 | When one developer (depending on your work flow) finishes working on the feature he or she can issue `git flow feature finish ` and this will automatically delete the remote branch. All other developers shall then run: 196 | ```shell 197 | git flow feature delete 198 | ``` 199 | 200 | to get rid of the local feature that tracks a remote branch that no more exist. 201 | 202 | ### Share hotfixes with others 203 | 204 | You can publish an hotfix you are working on. The reason can be to allow other programmers to work on it or validate it or to access it from another machine. 205 | 206 | When you want to publish an hotfix just use (as you did for features): 207 | ```shell 208 | git flow hotfix publish 209 | ``` 210 | 211 | or, if you already are into the `hotfix/` branch, just issue: 212 | ```shell 213 | git flow hotfix publish 214 | ``` 215 | 216 | Other developers can now update their repositories and checkout the hotfix: 217 | ```shell 218 | git pull 219 | git checkout hotfix/ 220 | ``` 221 | and eventually finish it: 222 | ```shell 223 | git flow hotfix finish 224 | ``` 225 | 226 | 227 | ### Using Hooks and Filters 228 | 229 | For a wide variety of commands hooks or filters can be called before and after 230 | the command. 231 | The files should be placed in .git/hooks 232 | In the directory hooks you can find examples of all the hooks available. 233 | 234 | ## Showing your appreciation 235 | 236 | Of course, the best way to show your appreciation for the git-flow tool itself 237 | remains contributing to the community. If you'd like to show your appreciation 238 | in another way, however, consider donating through PayPal: 239 | 240 | [![PayPal][2]][1] 241 | 242 | [1]: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=S85FXJ9EBHAF2&lc=US&item_name=gitflow&item_number=gitflow&no_note=0&cn=Add%20special%20instructions%20to%20the%20seller&no_shipping=1&rm=1&return=https%3a%2f%2fgithub%2ecom%2fpetervanderdoes%2fgitflow&cancel_return=https%3a%2f%2fgithub%2ecom%2fpetervanderdoes%2fgitflow¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted 243 | 244 | [2]: https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif 245 | -------------------------------------------------------------------------------- /git-flow-config: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # vim:et:ft=sh:sts=2:sw=2 3 | # 4 | # git-flow -- A collection of Git extensions to provide high-level 5 | # repository operations for Vincent Driessen's branching model. 6 | # 7 | # A blog post presenting this model is found at: 8 | # http://blog.avirtualhome.com/development-workflow-using-git/ 9 | # 10 | # Feel free to contribute to this project at: 11 | # http://github.com/petervanderdoes/gitflow 12 | # 13 | # Authors: 14 | # Copyright 2012-2019 Peter van der Does. All rights reserved. 15 | # 16 | # 17 | # Redistribution and use in source and binary forms, with or without 18 | # modification, are permitted provided that the following conditions are met: 19 | # 20 | # 1. Redistributions of source code must retain the above copyright notice, this 21 | # list of conditions and the following disclaimer. 22 | # 2. Redistributions in binary form must reproduce the above copyright notice, 23 | # this list of conditions and the following disclaimer in the documentation 24 | # and/or other materials provided with the distribution. 25 | # 26 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 27 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 28 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 29 | # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 30 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 31 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 32 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 33 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 34 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 35 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | # 37 | 38 | 39 | initialize() { 40 | require_git_repo 41 | require_gitflow_initialized 42 | gitflow_load_settings 43 | } 44 | 45 | usage() { 46 | OPTIONS_SPEC="\ 47 | git flow config [list] 48 | git flow config set 49 | git flow config base 50 | 51 | Manage the git-flow configuration. 52 | 53 | For more specific help type the command followed by --help 54 | -- 55 | " 56 | flags_help 57 | } 58 | 59 | parse_args() { 60 | # Parse options 61 | FLAGS "$@" || exit $? 62 | eval set -- "${FLAGS_ARGV}" 63 | 64 | OPTION=$(echo $1|tr '[:upper:]' '[:lower:]') 65 | 66 | if [ "$FLAGS_file" != "" ]; then 67 | gitflow_config_option="--file '$FLAGS_file'" 68 | elif flag local; then 69 | gitflow_config_option="--local" 70 | elif flag global; then 71 | gitflow_config_option="--global" 72 | elif flag system; then 73 | gitflow_config_option="--system" 74 | else 75 | gitflow_config_option="" 76 | fi 77 | 78 | } 79 | 80 | # Default entry when no SUBACTION is given 81 | cmd_default() { 82 | cmd_list "$@" 83 | } 84 | 85 | cmd_list() { 86 | OPTIONS_SPEC="\ 87 | git flow config [list] 88 | 89 | Show the git-flow configurations 90 | -- 91 | h,help! Show this help 92 | 93 | Use config file location 94 | local! Use repository config file 95 | global! Use global config file 96 | system! Use system config file 97 | file= Use given config file 98 | " 99 | local output 100 | 101 | # Define flags 102 | DEFINE_boolean 'local' false 'use repository config file' 103 | DEFINE_boolean 'global' false 'use global config file' 104 | DEFINE_boolean 'system' false 'use system config file' 105 | DEFINE_string 'file' "" 'use given config file' 106 | 107 | # Parse arguments 108 | parse_args "$@" 109 | 110 | output=$(git config $gitflow_config_option --get gitflow.branch.master) 111 | echo "Branch name for production releases: $output " 112 | 113 | output=$(git config $gitflow_config_option --get gitflow.branch.develop) 114 | echo "Branch name for \"next release\" development: $output " 115 | 116 | output=$(git config $gitflow_config_option --get gitflow.prefix.feature) 117 | echo "Feature branch prefix: $output " 118 | 119 | output=$(git config $gitflow_config_option --get gitflow.prefix.bugfix) 120 | echo "Bugfix branch prefix: $output " 121 | 122 | output=$(git config $gitflow_config_option --get gitflow.prefix.release) 123 | echo "Release branch prefix: $output " 124 | 125 | output=$(git config $gitflow_config_option --get gitflow.prefix.hotfix) 126 | echo "Hotfix branch prefix: $output " 127 | 128 | output=$(git config $gitflow_config_option --get gitflow.prefix.support) 129 | echo "Support branch prefix: $output " 130 | 131 | output=$(git config $gitflow_config_option --get gitflow.prefix.versiontag) 132 | echo "Version tag prefix: $output " 133 | } 134 | 135 | cmd_set() { 136 | OPTIONS_SPEC="\ 137 | git flow config set