main and branch are entirely different commit histories

33 Views Asked by At

This is my git graph

enter image description here

Where the graph was disconnected, I changed the file I was working on. I was working on the file A by connecting it to origin, but I disconnected A's origin and created a new file B, and then connected the origin to this file. So I think that's why graph is disconnected. The problem is when I do PR, I get an error saying "main and branch are entirely different commitment histories." What should I do if I want to connect those two and do PR?

  • I don't think it's a matter of main and master's branches. I already changed it to main.
0

There are 0 best solutions below