I have a situation like this:
- I have a main branch
master
, a feature branchfeat
and a fixup branchfixes
. - The
fixes
branch hardcodes some assumptions that make it possible to do local development. (Things like not requiring https or licenses or hardware keys. Stuff that I don't want to accidentally push to prod) - I want to stay on
fixes
branch locally but I want to make commits on thefeat
branch. - I want the
fixes
branch to always be on top offeat
.
Assume that this is my current situation:
A---B---C <---master
\
D---E---F <---feat
\
G---H <---fixes, HEAD
I do some work and make a commit. This is what I want the result to be:
A---B---C <---master
\
D---E---F---I <---feat
\
G---H <---fixes, HEAD
My idea says that it can be done by first making commit I
on fixes
then cherry-picking it on feat
then resetting fixes
to H
then rebasing fixes
on top of feat
.
This seems like a lot of work to do manually. Is there a way to automate this?