I’m using git-flow for my projects, and have started a rather complicated set of changes in the develop branch, which appear to take longer than I expected first.
I wish I had done this in a feature branch, since I’d like to make a new release with other changes. How can I move these uncommitted changes into a new git-flow feature branch?
If you’ve made no commits
If you simply have a dirty working copy, just act like you are about to start a new feature:
If you did make some commits
If there are commits in develop that should have been in your feature branch, the above steps are the same. In addition though you’ll (possibly – this isn’t required) want to reset your develop branch back to where it was before you started committing the changes for your feature branch, which you can do with: