Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitflow
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tools
gitflow
Commits
a2f53f94
Commit
a2f53f94
authored
Jul 09, 2012
by
Vincent Driessen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into track-for-hotfix
parents
76ec133f
805d2454
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
75 additions
and
32 deletions
+75
-32
AUTHORS
AUTHORS
+1
-0
README.mdown
README.mdown
+1
-1
git-flow
git-flow
+4
-1
git-flow-feature
git-flow-feature
+16
-7
git-flow-hotfix
git-flow-hotfix
+9
-5
git-flow-init
git-flow-init
+7
-1
git-flow-release
git-flow-release
+30
-12
git-flow-support
git-flow-support
+7
-5
No files found.
AUTHORS
View file @
a2f53f94
...
@@ -19,5 +19,6 @@ Authors are (ordered by first commit date):
...
@@ -19,5 +19,6 @@ Authors are (ordered by first commit date):
- Emre Berge Ergenekon
- Emre Berge Ergenekon
- Eric Holmes
- Eric Holmes
- Vedang Manerikar
- Vedang Manerikar
- Myke Hines
Portions derived from other open source works are clearly marked.
Portions derived from other open source works are clearly marked.
README.mdown
View file @
a2f53f94
...
@@ -138,7 +138,7 @@ Showing your appreciation
...
@@ -138,7 +138,7 @@ Showing your appreciation
A few people already requested it, so now it's here: a Flattr button.
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
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
contributing to the community. If you'd like to show your appreciation in
another way, however, consider Flattr'ing me:
another way, however, consider Flattr'ing me:
...
...
git-flow
View file @
a2f53f94
...
@@ -109,7 +109,10 @@ main() {
...
@@ -109,7 +109,10 @@ main() {
fi
fi
# run the specified action
# run the specified action
cmd_
$SUBACTION
"
$@
"
if
[
$SUBACTION
!=
"help"
]
;
then
init
fi
cmd_
$SUBACTION
"
$@
"
}
}
main
"
$@
"
main
"
$@
"
git-flow-feature
View file @
a2f53f94
...
@@ -36,15 +36,17 @@
...
@@ -36,15 +36,17 @@
# policies, either expressed or implied, of Vincent Driessen.
# policies, either expressed or implied, of Vincent Driessen.
#
#
require_git_repo
init() {
require_gitflow_initialized
require_git_repo
gitflow_load_settings
require_gitflow_initialized
PREFIX=$(git config --get gitflow.prefix.feature)
gitflow_load_settings
PREFIX=$(git config --get gitflow.prefix.feature)
}
usage() {
usage() {
echo "usage: git flow feature [list] [-v]"
echo "usage: git flow feature [list] [-v]"
echo " git flow feature start [-F] <name> [<base>]"
echo " git flow feature start [-F] <name> [<base>]"
echo " git flow feature finish [-rFkD] [<name|nameprefix>]"
echo " git flow feature finish [-rFkD
S
] [<name|nameprefix>]"
echo " git flow feature publish <name>"
echo " git flow feature publish <name>"
echo " git flow feature track <name>"
echo " git flow feature track <name>"
echo " git flow feature diff [<name|nameprefix>]"
echo " git flow feature diff [<name|nameprefix>]"
...
@@ -232,6 +234,7 @@ cmd_finish() {
...
@@ -232,6 +234,7 @@ cmd_finish() {
DEFINE_boolean rebase false "rebase instead of merge" r
DEFINE_boolean rebase false "rebase instead of merge" r
DEFINE_boolean keep false "keep branch after performing finish" k
DEFINE_boolean keep false "keep branch after performing finish" k
DEFINE_boolean force_delete false "force delete feature branch after finish" D
DEFINE_boolean force_delete false "force delete feature branch after finish" D
DEFINE_boolean squash false "squash feature during merge" S
parse_args "$@"
parse_args "$@"
expand_nameprefix_arg_or_current
expand_nameprefix_arg_or_current
...
@@ -312,7 +315,13 @@ cmd_finish() {
...
@@ -312,7 +315,13 @@ cmd_finish() {
if [ "$(git rev-list -n2 "$DEVELOP_BRANCH..$BRANCH" | wc -l)" -eq 1 ]; then
if [ "$(git rev-list -n2 "$DEVELOP_BRANCH..$BRANCH" | wc -l)" -eq 1 ]; then
git merge --ff "$BRANCH"
git merge --ff "$BRANCH"
else
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
fi
if [ $? -ne 0 ]; then
if [ $? -ne 0 ]; then
...
@@ -507,7 +516,7 @@ cmd_pull() {
...
@@ -507,7 +516,7 @@ cmd_pull() {
exit 1
exit 1
fi
fi
else
else
it pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'."
g
it pull -q "$REMOTE" "$BRANCH" || die "Failed to pull from remote '$REMOTE'."
fi
fi
echo "Pulled $REMOTE's changes into $BRANCH."
echo "Pulled $REMOTE's changes into $BRANCH."
...
...
git-flow-hotfix
View file @
a2f53f94
...
@@ -36,11 +36,13 @@
...
@@ -36,11 +36,13 @@
# policies, either expressed or implied, of Vincent Driessen.
# policies, either expressed or implied, of Vincent Driessen.
#
#
require_git_repo
init() {
require_gitflow_initialized
require_git_repo
gitflow_load_settings
require_gitflow_initialized
VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
gitflow_load_settings
PREFIX=$(git config --get gitflow.prefix.hotfix)
VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
PREFIX=$(git config --get gitflow.prefix.hotfix)
}
usage() {
usage() {
echo "usage: git flow hotfix [list] [-v]"
echo "usage: git flow hotfix [list] [-v]"
...
@@ -242,6 +244,7 @@ cmd_finish() {
...
@@ -242,6 +244,7 @@ cmd_finish() {
DEFINE_boolean sign false "sign the release tag cryptographically" s
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 signingkey "" "use the given GPG-key for the digital signature (implies -s)" u
DEFINE_string message "" "use the given tag message" m
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 push false "push to $ORIGIN after performing finish" p
DEFINE_boolean keep false "keep branch after performing finish" k
DEFINE_boolean keep false "keep branch after performing finish" k
DEFINE_boolean notag false "don't tag this release" n
DEFINE_boolean notag false "don't tag this release" n
...
@@ -290,6 +293,7 @@ cmd_finish() {
...
@@ -290,6 +293,7 @@ cmd_finish() {
flag sign && opts="$opts -s"
flag sign && opts="$opts -s"
[ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'"
[ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'"
[ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
[ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
[ "$FLAGS_messagefile" != "" ] && opts="$opts -F '$FLAGS_messagefile'"
eval git tag $opts "$VERSION_PREFIX$VERSION" || \
eval git tag $opts "$VERSION_PREFIX$VERSION" || \
die "Tagging failed. Please run finish again to retry."
die "Tagging failed. Please run finish again to retry."
fi
fi
...
...
git-flow-init
View file @
a2f53f94
...
@@ -153,11 +153,17 @@ cmd_default() {
...
@@ -153,11 +153,17 @@ cmd_default() {
default_suggestion=
default_suggestion=
for guess in $(git config --get gitflow.branch.develop) \
for guess in $(git config --get gitflow.branch.develop) \
'develop' 'int' 'integration' 'master'; do
'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"
default_suggestion="$guess"
break
break
fi
fi
done
done
if [ -z $default_suggestion ]; then
should_check_existence=NO
default_suggestion=$(git config --get gitflow.branch.develop || echo develop)
fi
fi
fi
printf "Branch name for \"next release\" development: [$default_suggestion] "
printf "Branch name for \"next release\" development: [$default_suggestion] "
...
...
git-flow-release
View file @
a2f53f94
...
@@ -36,16 +36,18 @@
...
@@ -36,16 +36,18 @@
# policies, either expressed or implied, of Vincent Driessen.
# policies, either expressed or implied, of Vincent Driessen.
#
#
require_git_repo
init() {
require_gitflow_initialized
require_git_repo
gitflow_load_settings
require_gitflow_initialized
VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
gitflow_load_settings
PREFIX=$(git config --get gitflow.prefix.release)
VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
PREFIX=$(git config --get gitflow.prefix.release)
}
usage() {
usage() {
echo "usage: git flow release [list] [-v]"
echo "usage: git flow release [list] [-v]"
echo " git flow release start [-F] <version> [<base>]"
echo " git flow release start [-F] <version> [<base>]"
echo " git flow release finish [-Fsumpk] <version>"
echo " git flow release finish [-Fsumpk
S
] <version>"
echo " git flow release publish <name>"
echo " git flow release publish <name>"
echo " git flow release track <name>"
echo " git flow release track <name>"
}
}
...
@@ -190,9 +192,11 @@ cmd_finish() {
...
@@ -190,9 +192,11 @@ cmd_finish() {
DEFINE_boolean sign false "sign the release tag cryptographically" s
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 signingkey "" "use the given GPG-key for the digital signature (implies -s)" u
DEFINE_string message "" "use the given tag message" m
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 push false "push to $ORIGIN after performing finish" p
DEFINE_boolean keep false "keep branch after performing finish" k
DEFINE_boolean keep false "keep branch after performing finish" k
DEFINE_boolean notag false "don't tag this release" n
DEFINE_boolean notag false "don't tag this release" n
DEFINE_boolean squash false "squash release during merge" S
parse_args "$@"
parse_args "$@"
require_version_arg
require_version_arg
...
@@ -224,9 +228,15 @@ cmd_finish() {
...
@@ -224,9 +228,15 @@ cmd_finish() {
if ! git_is_branch_merged_into "$BRANCH" "$MASTER_BRANCH"; then
if ! git_is_branch_merged_into "$BRANCH" "$MASTER_BRANCH"; then
git checkout "$MASTER_BRANCH" || \
git checkout "$MASTER_BRANCH" || \
die "Could not check out $MASTER_BRANCH."
die "Could not check out $MASTER_BRANCH."
git merge --no-ff "$BRANCH" || \
if noflag squash; then
die "There were merge conflicts."
git merge --no-ff "$BRANCH" || \
# TODO: What do we do now?
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
fi
if noflag notag; then
if noflag notag; then
...
@@ -239,6 +249,7 @@ cmd_finish() {
...
@@ -239,6 +249,7 @@ cmd_finish() {
flag sign && opts="$opts -s"
flag sign && opts="$opts -s"
[ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'"
[ "$FLAGS_signingkey" != "" ] && opts="$opts -u '$FLAGS_signingkey'"
[ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
[ "$FLAGS_message" != "" ] && opts="$opts -m '$FLAGS_message'"
[ "$FLAGS_messagefile" != "" ] && opts="$opts -F '$FLAGS_messagefile'"
eval git tag $opts "$tagname" || \
eval git tag $opts "$tagname" || \
die "Tagging failed. Please run finish again to retry."
die "Tagging failed. Please run finish again to retry."
fi
fi
...
@@ -253,9 +264,16 @@ cmd_finish() {
...
@@ -253,9 +264,16 @@ cmd_finish() {
# TODO: Actually, accounting for 'git describe' pays, so we should
# TODO: Actually, accounting for 'git describe' pays, so we should
# ideally git merge --no-ff $tagname here, instead!
# ideally git merge --no-ff $tagname here, instead!
git merge --no-ff "$BRANCH" || \
if noflag squash; then
die "There were merge conflicts."
git merge --no-ff "$BRANCH" || \
# TODO: What do we do now?
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
fi
# delete branch
# delete branch
...
...
git-flow-support
View file @
a2f53f94
...
@@ -36,11 +36,13 @@
...
@@ -36,11 +36,13 @@
# policies, either expressed or implied, of Vincent Driessen.
# policies, either expressed or implied, of Vincent Driessen.
#
#
require_git_repo
init() {
require_gitflow_initialized
require_git_repo
gitflow_load_settings
require_gitflow_initialized
VERSION_PREFIX=$(eval "echo `git config --get gitflow.prefix.versiontag`")
gitflow_load_settings
PREFIX=$(git config --get gitflow.prefix.support)
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: The support subcommand is still very EXPERIMENTAL!"
warn "note: DO NOT use it in a production situation."
warn "note: DO NOT use it in a production situation."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment