I have my main branch a bit messed up, nothing there matters anymore I want to bring everything as it is from a branch called dev into main
Since I want main to be now an exact copy of dev branch, I tried deleting everything on main branch and doing a normal merge, but to my surprise the previous history of previous files made a lot of conflicts and also made some files to simply not even merge at all and are not present after the merge, so this option did not work.
I also tried checkout to main branch, do a hard reset on dev branch and force push as suggested on some other place, also did not work, this operation just created another head on dev branch, weird.
Maybe I should find a way to completely clean out main branch and make it forget/ignore past history and just "accept" whatever is merged into it. If that works, how could I do that.
If there is another option, please let me know (I was having high hopes that force push dev branch into main would work, but I could not make that work either)
Thanks