nvie / gitflow

Git extensions to provide high-level repository operations for Vincent Driessen's branching model.
http://nvie.com/posts/a-successful-git-branching-model/
Other
26.6k stars 2.66k forks source link

Feature request: feature finish should merge to its BASE branch #415

Open istrasci opened 9 years ago

istrasci commented 9 years ago

I often find myself creating large-ish features such that they require a list of "sub"-features. For example, consider a login feature that might have several disjoint tasks to get it all to work: the UI for the login page, authentication code, authorization code, success/failure code, etc. I would first create a login feature

$ git flow feature start login

and then create sub-features based on that it.

$ git flow feature start login-ui feature/login
$ git flow feature start login-authorization feature/login
...

However, when I finish a sub-feature, I would expect it to be merged back to the BASE branch, login. But instead, it gets merged back to develop.

Not only does this seems counter-intuitive, but I can't think of a good reason you'd want to merge directly back to develop. It would be nice to have an option to specify which branch to merge back to; or better yet, merge back to the BASE branch by default, and have to specify to merge back to develop.

SparK-Cruz commented 9 years ago

feature start will always branch off from develop branch

even when you are inside other feature branch with commits, you won't have them inside your new feature branch unless you merge

istrasci commented 9 years ago

@SparK-Cruz : Um, not according to the documentation (and my experience).

git flow feature start [-F] []

-F fetch from $ORIGIN before performing local operation

Start new feature , optionally basing it on instead of

Here's output from a test:

$ git status
On branch develop
nothing to commit, working directory clean
$ git flow feature start login
Switched to a new branch 'feature/login'
Summary of actions:
- A new branch 'feature/login' was created, based on 'develop'
- You are now on branch 'feature/login'
Now, start committing on your feature. When done, use:
     git flow feature finish login
$ git status
On branch feature/login
nothing to commit, working directory clean
$ git flow feature start login-ui feature/login
Switched to a new branch 'feature/login-ui'
Summary of actions:
- A new branch 'feature/login-ui' was created, based on 'feature/login'  <---- PROOF HERE
- You are now on branch 'feature/login-ui'
Now, start committing on your feature. When done, use:
     git flow feature finish login-ui
$ git flow feature finish login-ui
Switched to branch 'develop'
Already up-to-date.
Deleted branch feature/login-ui (was 0827fe4).
Summary of actions:
- The feature branch 'feature/login-ui' was merged into 'develop'
- Feature branch 'feature/login-ui' has been removed
- You are now on branch 'develop'
rob-gonz commented 7 years ago

Umm so is no one looking into this. Just found this issue myself while coding. Gonna be more work for us till this is fixed. Set base as support branch, feature is then merged back into develop.