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
17a8112b
Commit
17a8112b
authored
Jan 29, 2010
by
Vincent Driessen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/no-connectivity-for-feature-branches' into develop
parents
57e7bde9
2acfffd9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
9 deletions
+52
-9
git-flow-feature
git-flow-feature
+16
-3
git-flow-hotfix
git-flow-hotfix
+12
-3
git-flow-release
git-flow-release
+12
-2
git-flow-support
git-flow-support
+12
-1
No files found.
git-flow-feature
View file @
17a8112b
...
...
@@ -13,6 +13,7 @@
#
PREFIX=$(git config --get gitflow.prefix.feature || echo feature/)
FLAG_FETCH=0
usage() {
echo "usage: git flow feature [list]"
...
...
@@ -55,6 +56,10 @@ cmd_help() {
}
parse_args() {
# TODO: When we have a nice structured way of parsing flags with getopt,
# implement the following flags:
# --fetch, to set FLAG_FETCH=1
# --no-fetch, to set FLAG_FETCH=0
NAME="$1"
BASE="${2:-$DEVELOP_BRANCH}"
if [ "$NAME" = "" ]; then
...
...
@@ -71,11 +76,14 @@ cmd_start() {
# sanity checks
gitflow_require_clean_working_tree
gitflow_require_branch_absent $BRANCH
if [ "$BASE" = "$DEVELOP_BRANCH" ]; then
# update the local repo with remote changes, if asked
if [ $FLAG_FETCH -eq 1 ]; then
git fetch -q $ORIGIN $DEVELOP_BRANCH
gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
fi
gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
# create branch
git checkout -b $BRANCH $BASE
...
...
@@ -96,7 +104,12 @@ cmd_finish() {
# sanity checks
gitflow_require_clean_working_tree
gitflow_require_branch $BRANCH
git fetch -q $ORIGIN
# update local repo with remote changes first, if asked
if [ $FLAG_FETCH -eq 1 ]; then
git fetch -q $ORIGIN $BRANCH
fi
if has $ORIGIN/$BRANCH $REMOTE_BRANCHES; then
gitflow_require_branches_equal $BRANCH $ORIGIN/$BRANCH
fi
...
...
git-flow-hotfix
View file @
17a8112b
...
...
@@ -14,6 +14,7 @@
VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag)
PREFIX=$(git config --get gitflow.prefix.hotfix || echo hotfix/)
FLAG_FETCH=1
usage() {
echo "usage: git flow hotfix [list]"
...
...
@@ -50,6 +51,10 @@ cmd_help() {
}
parse_args() {
# TODO: When we have a nice structured way of parsing flags with getopt,
# implement the following flags:
# --fetch, to set FLAG_FETCH=1
# --no-fetch, to set FLAG_FETCH=0
VERSION="$1"
BASE="${2:-$MASTER_BRANCH}"
if [ "$VERSION" = "" ]; then
...
...
@@ -65,7 +70,9 @@ cmd_start() {
# sanity checks
gitflow_require_clean_working_tree
git fetch -q $ORIGIN
if [ $FLAG_FETCH -eq 1 ]; then
git fetch -q $ORIGIN $MASTER_BRANCH
fi
gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH
gitflow_require_branch_absent $BRANCH
...
...
@@ -91,8 +98,10 @@ cmd_finish() {
# sanity checks
gitflow_require_clean_working_tree
if [ $FLAG_FETCH -eq 1 ]; then
git fetch -q $ORIGIN $MASTER_BRANCH
git fetch -q $ORIGIN $DEVELOP_BRANCH
fi
gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH
gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
...
...
git-flow-release
View file @
17a8112b
...
...
@@ -14,6 +14,7 @@
VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag)
PREFIX=$(git config --get gitflow.prefix.release || echo release/)
FLAG_FETCH=1
usage() {
echo "usage: git flow release [list]"
...
...
@@ -51,6 +52,10 @@ cmd_help() {
}
parse_args() {
# TODO: When we have a nice structured way of parsing flags with getopt,
# implement the following flags:
# --fetch, to set FLAG_FETCH=1
# --no-fetch, to set FLAG_FETCH=0
VERSION="$1"
if [ "$VERSION" = "" ]; then
echo "Missing argument <version>."
...
...
@@ -65,7 +70,9 @@ cmd_start() {
# sanity checks
gitflow_require_clean_working_tree
git fetch -q $ORIGIN
if [ $FLAG_FETCH -eq 1 ]; then
git fetch -q $ORIGIN $DEVELOP_BRANCH
fi
gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
gitflow_require_branch_absent $BRANCH
...
...
@@ -91,7 +98,10 @@ cmd_finish() {
# sanity checks
gitflow_require_clean_working_tree
git fetch -q $ORIGIN
if [ $FLAG_FETCH -eq 1 ]; then
git fetch -q $ORIGIN $MASTER_BRANCH
git fetch -q $ORIGIN $DEVELOP_BRANCH
fi
gitflow_require_branches_equal $MASTER_BRANCH $ORIGIN/$MASTER_BRANCH
gitflow_require_branches_equal $DEVELOP_BRANCH $ORIGIN/$DEVELOP_BRANCH
...
...
git-flow-support
View file @
17a8112b
...
...
@@ -14,6 +14,7 @@
VERSION_PREFIX=$(git config --get gitflow.prefix.versiontag)
PREFIX=$(git config --get gitflow.prefix.support || echo support/)
FLAG_FETCH=1
usage() {
echo "usage: git flow support [list]"
...
...
@@ -39,6 +40,10 @@ cmd_help() {
}
parse_args() {
# TODO: When we have a nice structured way of parsing flags with getopt,
# implement the following flags:
# --fetch, to set FLAG_FETCH=1
# --no-fetch, to set FLAG_FETCH=0
VERSION="$1"
BASE="${2:-${VERSION_PREFIX}${VERSION}}"
if [ "$VERSION" = "" ]; then
...
...
@@ -55,12 +60,18 @@ cmd_start() {
# sanity checks
gitflow_require_clean_working_tree
# fetch remote changes
if [ $FLAG_FETCH -eq 1 ]; then
git fetch -q $ORIGIN $BASE
fi
gitflow_require_branches_equal $BRANCH $ORIGIN/$BRANCH
# create branch
git checkout -b $BRANCH $BASE
# publish branch
git push $ORIGIN $BRANCH:refs/heads/$BRANCH
git fetch -q $ORIGIN
git config branch.$BRANCH.remote $ORIGIN
git config branch.$BRANCH.merge refs/heads/$BRANCH
git checkout $BRANCH
...
...
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