Fix: unnecessary requirement of origin when creating a new feature branch.
Only test if local branch is behind origin if origin exists.
diff --git a/git-flow-feature b/git-flow-feature
index 7cba61b..a1c2ff8 100644
--- a/git-flow-feature
+++ b/git-flow-feature
@@ -182,7 +182,11 @@
git fetch -q "$ORIGIN" "$DEVELOP_BRANCH"
fi
- require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
+ # if the origin branch counterpart exists, assert that the local branch
+ # isn't behind it (to avoid unnecessary rebasing)
+ if git_branch_exists "$ORIGIN/$DEVELOP_BRANCH"; then
+ require_branches_equal "$DEVELOP_BRANCH" "$ORIGIN/$DEVELOP_BRANCH"
+ fi
# create branch
if ! git checkout -b "$BRANCH" "$BASE"; then