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
b1033aa3
Commit
b1033aa3
authored
Mar 23, 2010
by
Vincent Driessen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitflow-init honors global gitflow configuration that may exist before a
new repo is created.
parent
477a88d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
git-flow-init
git-flow-init
+15
-6
No files found.
git-flow-init
View file @
b1033aa3
...
...
@@ -61,7 +61,7 @@ cmd_default() {
if [ "$branch_count" -eq 0 ]; then
echo "No branches exist yet. Base branches must be created now."
should_check_existence=NO
default_suggestion=
master
default_suggestion=
$(git config --get gitflow.branch.master || echo master)
else
echo
echo "Which branch should be used for bringing forth production releases?"
...
...
@@ -69,7 +69,8 @@ cmd_default() {
should_check_existence=YES
default_suggestion=
for guess in 'production' 'main' 'master'; do
for guess in $(git config --get gitflow.branch.master) \
'production' 'main' 'master'; do
if git_local_branch_exists "$guess"; then
default_suggestion="$guess"
break
...
...
@@ -103,7 +104,7 @@ cmd_default() {
branch_count=$(git_local_branches | grep -v "^${master_branch}\$" | wc -l)
if [ "$branch_count" -eq 0 ]; then
should_check_existence=NO
default_suggestion=
develop
default_suggestion=
$(git config --get gitflow.branch.develop || echo develop)
else
echo
echo "Which branch should be used for integration of the \"next release\"?"
...
...
@@ -111,7 +112,8 @@ cmd_default() {
should_check_existence=YES
default_suggestion=
for guess in 'develop' 'int' 'integration' 'master'; do
for guess in $(git config --get gitflow.branch.develop) \
'develop' 'int' 'integration' 'master'; do
if git_local_branch_exists "$guess"; then
default_suggestion="$guess"
break
...
...
@@ -174,8 +176,15 @@ cmd_default() {
fi
# finally, ask the user for naming conventions (branch and tag prefixes)
echo
echo "How to name your supporting branch prefixes?"
if flag force || \
! git config --get gitflow.prefix.feature >/dev/null 2>&1 ||
! git config --get gitflow.prefix.release >/dev/null 2>&1 ||
! git config --get gitflow.prefix.hotfix >/dev/null 2>&1 ||
! git config --get gitflow.prefix.support >/dev/null 2>&1 ||
! git config --get gitflow.prefix.versiontag >/dev/null 2>&1; then
echo
echo "How to name your supporting branch prefixes?"
fi
local prefix
...
...
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