Essentially, I want to merge a feature
branch into main
when the two branches have diverged and I can’t fast-forward the merge.
If doing this manually, I would checkout the feature
branch, rebase it onto main
, switch back and merge the result. This, however, changes the feature
branch, changes the working directory unnecessarily, and is just a little too much work for what is a straightforward option on GitHub.
What would be a good and safe way to do git rebase-and-merge
without these drawbacks?