Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:nvie/gitflow into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
nvie committed Nov 30, 2011
2 parents 49305ec + 921ddf5 commit b4626cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ Authors are (ordered by first commit date):
- Jon Bernard
- Olivier Mengué
- Emre Berge Ergenekon
- Eric Holmes

Portions derived from other open source works are clearly marked.
8 changes: 7 additions & 1 deletion git-flow-init
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,14 @@ cmd_default() {

# check existence in case of an already existing repo
if [ "$should_check_existence" = "YES" ]; then
git_local_branch_exists "$master_branch" || \
# if no local branch exists and a remote branch of the same
# name exists, checkout that branch and use it for master
if ! git_local_branch_exists "$master_branch" && \
git_remote_branch_exists "origin/$master_branch"; then
git branch "$master_branch" "origin/$master_branch" >/dev/null 2>&1
elif ! git_local_branch_exists "$master_branch"; then
die "Local branch '$master_branch' does not exist."
fi
fi

# store the name of the master branch
Expand Down

0 comments on commit b4626cb

Please sign in to comment.