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
350e7159
Commit
350e7159
authored
Jan 26, 2010
by
Benedikt Böhm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make origin configurable
parent
4a864fbc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
31 deletions
+32
-31
git-flow
git-flow
+1
-0
git-flow-feature
git-flow-feature
+15
-15
git-flow-hotfix
git-flow-hotfix
+7
-7
git-flow-release
git-flow-release
+6
-6
git-flow-support
git-flow-support
+3
-3
No files found.
git-flow
View file @
350e7159
...
@@ -21,6 +21,7 @@ fi
...
@@ -21,6 +21,7 @@ fi
export
GITFLOW_DIR
=
$(
dirname
"
$0
"
)
export
GITFLOW_DIR
=
$(
dirname
"
$0
"
)
export
MASTER_BRANCH
=
$(
git config
--get
gitflow.branch.master
||
echo
master
)
export
MASTER_BRANCH
=
$(
git config
--get
gitflow.branch.master
||
echo
master
)
export
DEVELOP_BRANCH
=
$(
git config
--get
gitflow.branch.develop
||
echo
develop
)
export
DEVELOP_BRANCH
=
$(
git config
--get
gitflow.branch.develop
||
echo
develop
)
export
ORIGIN
=
$(
git config
--get
gitflow.origin
||
echo
origin
)
warn
()
{
echo
"
$@
"
>
&2
;
}
warn
()
{
echo
"
$@
"
>
&2
;
}
die
()
{
warn
"
$@
"
;
exit
1
;
}
die
()
{
warn
"
$@
"
;
exit
1
;
}
...
...
git-flow-feature
View file @
350e7159
...
@@ -55,8 +55,8 @@ cmd_start() {
...
@@ -55,8 +55,8 @@ cmd_start() {
gitflow_check_clean_working_tree
gitflow_check_clean_working_tree
gitflow_require_branch_absent $BRANCH
gitflow_require_branch_absent $BRANCH
if [ "$BASE" = "$DEVELOP_BRANCH" ]; then
if [ "$BASE" = "$DEVELOP_BRANCH" ]; then
git fetch
origin
$DEVELOP_BRANCH
git fetch
$ORIGIN
$DEVELOP_BRANCH
gitflow_require_branches_equal $DEVELOP_BRANCH
origin
/$DEVELOP_BRANCH
gitflow_require_branches_equal $DEVELOP_BRANCH
$ORIGIN
/$DEVELOP_BRANCH
fi
fi
# create branch
# create branch
...
@@ -79,12 +79,12 @@ cmd_finish() {
...
@@ -79,12 +79,12 @@ cmd_finish() {
# sanity checks
# sanity checks
gitflow_check_clean_working_tree
gitflow_check_clean_working_tree
gitflow_require_branch $BRANCH
gitflow_require_branch $BRANCH
git fetch
origin
git fetch
$ORIGIN
if has
origin
/$BRANCH $REMOTE_BRANCHES; then
if has
$ORIGIN
/$BRANCH $REMOTE_BRANCHES; then
gitflow_require_branches_equal $BRANCH
origin
/$BRANCH
gitflow_require_branches_equal $BRANCH
$ORIGIN
/$BRANCH
fi
fi
if [ "$BASE" = "$DEVELOP_BRANCH" ]; then
if [ "$BASE" = "$DEVELOP_BRANCH" ]; then
gitflow_require_branches_equal $DEVELOP_BRANCH
origin
/$DEVELOP_BRANCH
gitflow_require_branches_equal $DEVELOP_BRANCH
$ORIGIN
/$DEVELOP_BRANCH
fi
fi
# merge into BASE
# merge into BASE
...
@@ -97,7 +97,7 @@ cmd_finish() {
...
@@ -97,7 +97,7 @@ cmd_finish() {
# delete branch
# delete branch
# TODO: How do we handle merge conflicts here??
# TODO: How do we handle merge conflicts here??
git push
origin
:refs/heads/$BRANCH
git push
$ORIGIN
:refs/heads/$BRANCH
git branch -d $BRANCH
git branch -d $BRANCH
echo
echo
...
@@ -115,15 +115,15 @@ cmd_publish() {
...
@@ -115,15 +115,15 @@ cmd_publish() {
# sanity checks
# sanity checks
gitflow_check_clean_working_tree
gitflow_check_clean_working_tree
gitflow_require_branch $BRANCH
gitflow_require_branch $BRANCH
git fetch
origin
git fetch
$ORIGIN
gitflow_require_branch_absent
origin
/$BRANCH
gitflow_require_branch_absent
$ORIGIN
/$BRANCH
# create remote branch
# create remote branch
git push
origin
$BRANCH:refs/heads/$BRANCH
git push
$ORIGIN
$BRANCH:refs/heads/$BRANCH
git fetch
origin
git fetch
$ORIGIN
# configure remote tracking
# configure remote tracking
git config branch.$BRANCH.remote
origin
git config branch.$BRANCH.remote
$ORIGIN
git config branch.$BRANCH.merge refs/heads/$BRANCH
git config branch.$BRANCH.merge refs/heads/$BRANCH
git checkout $BRANCH
git checkout $BRANCH
...
@@ -141,11 +141,11 @@ cmd_track() {
...
@@ -141,11 +141,11 @@ cmd_track() {
# sanity checks
# sanity checks
gitflow_check_clean_working_tree
gitflow_check_clean_working_tree
gitflow_require_branch_absent $BRANCH
gitflow_require_branch_absent $BRANCH
git fetch
origin
git fetch
$ORIGIN
gitflow_require_branch
origin
/$BRANCH
gitflow_require_branch
$ORIGIN
/$BRANCH
# create tracking branch
# create tracking branch
git checkout -b $BRANCH
origin
/$BRANCH
git checkout -b $BRANCH
$ORIGIN
/$BRANCH
echo
echo
echo "Summary of actions:"
echo "Summary of actions:"
...
...
git-flow-hotfix
View file @
350e7159
...
@@ -48,8 +48,8 @@ cmd_start() {
...
@@ -48,8 +48,8 @@ cmd_start() {
# sanity checks
# sanity checks
gitflow_check_clean_working_tree
gitflow_check_clean_working_tree
git fetch
origin
git fetch
$ORIGIN
gitflow_require_branches_equal $MASTER_BRANCH
origin
/$MASTER_BRANCH
gitflow_require_branches_equal $MASTER_BRANCH
$ORIGIN
/$MASTER_BRANCH
gitflow_require_branch_absent $BRANCH
gitflow_require_branch_absent $BRANCH
# create branch
# create branch
...
@@ -74,10 +74,10 @@ cmd_finish() {
...
@@ -74,10 +74,10 @@ cmd_finish() {
# sanity checks
# sanity checks
gitflow_check_clean_working_tree
gitflow_check_clean_working_tree
git fetch
origin
$MASTER_BRANCH
git fetch
$ORIGIN
$MASTER_BRANCH
git fetch
origin
$DEVELOP_BRANCH
git fetch
$ORIGIN
$DEVELOP_BRANCH
gitflow_require_branches_equal $MASTER_BRANCH
origin
/$MASTER_BRANCH
gitflow_require_branches_equal $MASTER_BRANCH
$ORIGIN
/$MASTER_BRANCH
gitflow_require_branches_equal $DEVELOP_BRANCH
origin
/$DEVELOP_BRANCH
gitflow_require_branches_equal $DEVELOP_BRANCH
$ORIGIN
/$DEVELOP_BRANCH
# merge into BASE
# merge into BASE
git checkout $BASE
git checkout $BASE
...
@@ -99,7 +99,7 @@ cmd_finish() {
...
@@ -99,7 +99,7 @@ cmd_finish() {
echo
echo
echo "Summary of actions:"
echo "Summary of actions:"
echo "- Latest objects have been fetched from '
origin
'"
echo "- Latest objects have been fetched from '
$ORIGIN
'"
echo "- Hotfix branch has been merged into '$BASE'"
echo "- Hotfix branch has been merged into '$BASE'"
echo "- The hotfix was tagged 'v$VERSION'"
echo "- The hotfix was tagged 'v$VERSION'"
if [ "$BASE" = "$MASTER_BRANCH" ]; then
if [ "$BASE" = "$MASTER_BRANCH" ]; then
...
...
git-flow-release
View file @
350e7159
...
@@ -48,8 +48,8 @@ cmd_start() {
...
@@ -48,8 +48,8 @@ cmd_start() {
# sanity checks
# sanity checks
gitflow_check_clean_working_tree
gitflow_check_clean_working_tree
git fetch
origin
git fetch
$ORIGIN
gitflow_require_branches_equal $DEVELOP_BRANCH
origin
/$DEVELOP_BRANCH
gitflow_require_branches_equal $DEVELOP_BRANCH
$ORIGIN
/$DEVELOP_BRANCH
gitflow_require_branch_absent $BRANCH
gitflow_require_branch_absent $BRANCH
# create branch
# create branch
...
@@ -74,9 +74,9 @@ cmd_finish() {
...
@@ -74,9 +74,9 @@ cmd_finish() {
# sanity checks
# sanity checks
gitflow_check_clean_working_tree
gitflow_check_clean_working_tree
git fetch
origin
git fetch
$ORIGIN
gitflow_require_branches_equal $MASTER_BRANCH
origin
/$MASTER_BRANCH
gitflow_require_branches_equal $MASTER_BRANCH
$ORIGIN
/$MASTER_BRANCH
gitflow_require_branches_equal $DEVELOP_BRANCH
origin
/$DEVELOP_BRANCH
gitflow_require_branches_equal $DEVELOP_BRANCH
$ORIGIN
/$DEVELOP_BRANCH
# merge into master
# merge into master
git checkout $MASTER_BRANCH
git checkout $MASTER_BRANCH
...
@@ -95,7 +95,7 @@ cmd_finish() {
...
@@ -95,7 +95,7 @@ cmd_finish() {
echo
echo
echo "Summary of actions:"
echo "Summary of actions:"
echo "- Latest objects have been fetched from '
origin
'"
echo "- Latest objects have been fetched from '
$ORIGIN
'"
echo "- Release branch has been merged into '$MASTER_BRANCH'"
echo "- Release branch has been merged into '$MASTER_BRANCH'"
echo "- The release was tagged 'v$VERSION'"
echo "- The release was tagged 'v$VERSION'"
echo "- Release branch has been back-merged into '$DEVELOP_BRANCH'"
echo "- Release branch has been back-merged into '$DEVELOP_BRANCH'"
...
...
git-flow-support
View file @
350e7159
...
@@ -42,9 +42,9 @@ cmd_start() {
...
@@ -42,9 +42,9 @@ cmd_start() {
git checkout -b $BRANCH $BASE
git checkout -b $BRANCH $BASE
# publish branch
# publish branch
git push
origin
$BRANCH:refs/heads/$BRANCH
git push
$ORIGIN
$BRANCH:refs/heads/$BRANCH
git fetch
origin
git fetch
$ORIGIN
git config branch.$BRANCH.remote
origin
git config branch.$BRANCH.remote
$ORIGIN
git config branch.$BRANCH.merge refs/heads/$BRANCH
git config branch.$BRANCH.merge refs/heads/$BRANCH
git co $BRANCH
git co $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