Reputation: 309
I've been using Git Flow to help manage branch and workflow. I love how it works, although have a general question when working with multi feature branches.
For an example I would start a feature branch, make some adjustments. If I then create another feature branch, the new changes are also included in this feature branch. If I want to complete one feature branch and finish it, it won't let me unless I commit all untagged files.
Is there a better way to handle this work flow? So that I can have multi feature branches, and finish off a branch, and checkout/commit only the changes I want?
The idea is to be able to work on different issues and push code from that fix, still having different feature branches with uncommitted updates.
Thanks!
Upvotes: 0
Views: 103
Reputation: 14468
If you have two feature branches A and B and you work on feature branch A, don't commit and switch to B, the uncommitted changes will follow you to the B branch. That's just how git works. You can either commit your changes or stash your changes.
From what you ask you seem to be looking for git stash.
For more info on git stash see the documentation: http://www.kernel.org/pub/software/scm/git/docs/git-stash.html
Upvotes: 1