Branch has progressed too far to merge

Hi. I’ve been working on a branch for so long now that it has really become the main project. It has changed so much that it isn’t possible to merge it with the original main. I tried with a cloned project and it basically breaks the app with some seriously messed up issues. Does anyone know of a way to turn a branch into main without merging? I suspect that it isn’t possible, but thought I’d ask anyway just in case anyone has some ideas.

Have you tried something like this?

How to Make the Current Git Branch a Master Branch

Convert a Given Git Branch to Master and Retain History

Thanks. I’ll take a look.

Honestly if you don’t care about the original main branch you can just delete it and rename the branch you’re on as main

Or merge main into your current branch, and then delete main, and rename yours

Yes, I don’t care about the main branch, just the one that I’ve been working on for so long leaving the others behind. To attempt a merge terrifies me, because there is too much to lose. Renaming it sounds good to me.

But if your branch (let’s just call it “progress”) is breached from main. Merging main into progress shouldn’t be an issue. Because really it should already have everything.

Rename progress to main And then delete the original main