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
f476d260
Commit
f476d260
authored
Feb 20, 2010
by
Vincent Driessen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
While we're user input in git flow init, ask the user for all prefix
conventions, too.
parent
3227d802
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
2 deletions
+41
-2
git-flow-init
git-flow-init
+41
-2
No files found.
git-flow-init
View file @
f476d260
...
...
@@ -46,6 +46,7 @@ cmd_default() {
fi
local branch_count
local answer
# add a master branch if no such branch exists yet
local master_branch
...
...
@@ -176,8 +177,46 @@ cmd_default() {
git checkout -q "$develop_branch"
fi
# TODO: finally, ask the user for naming convention preferences
# i.e. tag prefixes, prefixes for supporting branches, etc.
# finally, ask the user for naming conventions (branch and tag prefixes)
echo
echo "How to name your supporting branch prefixes?"
local prefix
# Feature branches
default_suggestion=$(git config --get gitflow.prefix.feature || echo feature/)
echo "Feature branches? [$default_suggestion] \c"
read answer
prefix=${answer:-$default_suggestion}
git config gitflow.prefix.feature "$prefix"
# Release branches
default_suggestion=$(git config --get gitflow.prefix.release || echo release/)
echo "Release branches? [$default_suggestion] \c"
read answer
prefix=${answer:-$default_suggestion}
git config gitflow.prefix.release "$prefix"
# Hotfix branches
default_suggestion=$(git config --get gitflow.prefix.hotfix || echo hotfix/)
echo "Hotfix branches? [$default_suggestion] \c"
read answer
prefix=${answer:-$default_suggestion}
git config gitflow.prefix.hotfix "$prefix"
# Support branches
default_suggestion=$(git config --get gitflow.prefix.support || echo support/)
echo "Support branches? [$default_suggestion] \c"
read answer
prefix=${answer:-$default_suggestion}
git config gitflow.prefix.support "$prefix"
# Version tag prefix
default_suggestion=$(git config --get gitflow.prefix.versiontag || echo "")
echo "Version tag prefix? [$default_suggestion] \c"
read answer
prefix=${answer:-$default_suggestion}
git config gitflow.prefix.versiontag "$prefix"
# TODO: what to do with origin?
}
...
...
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