We find ourselves in the situation where master has new feature work, and feature1 (which branched off master) is the stable master. How can we change things so that they "trade places"? I.e., feature1 becomes master, and master becomes newfeaturebranch?
I found a couple similar SO questions, but in those cases they no longer cared about the old master commits. Here, we want to preserve the current master as the new newfeaturebranch.
I've thought of one way to do this:
- Create newfeaturebranch from the current master.
- Revert/delete commits from master back to feature1's branching point.
- Merge feature1 into master.
- Delete branch feature1.