I'm working on a new private (local) branch called TOPIC
implementing a new feature. After working on this new feature for a while, I realized that some of the stuff that I wrote really should be in it's own branch, GIZMO
. But I also have uncommitted files that should not be part of GIZMO
So lets say that I have the following files that haven't been committed:
foo/a.cpp
foo/b.cpp
foo/c.cpp
feature/magic.cpp
feature/unicorns.cpp
feature/gold.cpp
What I want to do is create a new topic branch GIZMO
consisting of foo/*
, so that I can commit that and merge it back to master
, and then continue working on TOPIC
.
This is different than other questions I have seen, because in those questions a new branch was being created from all uncommitted changes, and that's not what I want to do here. Here, I only want to make a new branch out of some of my uncommitted changes.
Is this possible?