I just spent the last few hours resolving merge conflicts that resulted from merging big-feature-branch-B into big-feature-branch-A. I am finally finished and all my resolutions are staged and ready to be committed. However, the process where I work is to:
- Create a branch off of
big-feature-branch-A(I'll call this branchAB-merge-branch) - Merge
big-feature-branch-BintoAB-merge-branch - Create a PR for to merge
AB-merge-branchintobig-feature-branch-A, so that the resolutions can go through code review.
By the time I was most of the way through resolving merge conflicts, I realized that I was resolving them in big-feature-branch-A rather than a merge branch.
My question is, how can I safely change branches before committing my changes?
I am sure the answer is simple, and normally I would just stash my changes, switch branches, then pop my changes. However, I have never done this in the midst of a merge, and I am very skittish about just "trying it" in this case, because I don't want to risk having to resolve all those conflicts again, and I am not super confident with my git-fu. I have also read horror stories like this (but maybe my case is different, because I have already resolved all conflicts, and all changes are staged?), and don't feel like experimenting in this case. Thank you!