Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

develop_branch uses origin/develop_branch as start-point if one exists. #167

Merged
merged 1 commit into from
Nov 28, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion git-flow-init
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ cmd_default() {
# default production branch and develop was "created". We should create
# the develop branch now in that case (we base it on master, of course)
if ! git_local_branch_exists "$develop_branch"; then
git branch --no-track "$develop_branch" "$master_branch"
if git_remote_branch_exists "origin/$develop_branch"; then
git branch "$develop_branch" "origin/$develop_branch" >/dev/null 2>&1
else
git branch --no-track "$develop_branch" "$master_branch"
fi
created_gitflow_branch=1
fi

Expand Down
4 changes: 4 additions & 0 deletions gitflow-common
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ git_local_branch_exists() {
has $1 $(git_local_branches)
}

git_remote_branch_exists() {
has $1 $(git_remote_branches)
}

git_branch_exists() {
has $1 $(git_all_branches)
}
Expand Down