0

I have 2 Git repos that I now wish to merge into one repo, but as separate branches (i.e. one will stay as the main branch, while the other becomes a branch of the remaining repo). Is this possible?

I've tried following the answer given here: Merge git repo into branch of another repo but I get the error

Automatic merge failed; fix conflicts and then commit the result.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Lisa Goh
  • 99
  • 6
  • Since you've already linked the other question we can't tell you more than what's written there for now. If you want to know more about the specific error you get you should show a [mre]. – mkrieger1 Mar 18 '22 at 13:02
  • Are you saying you just want to keep them as two branches which don't have any shared history? – IMSoP Mar 18 '22 at 14:25
  • As to "why do I get merge conflicts" - for the same reason you normally get them: both branches have changes to the same (sections of) files, so git doesn't know which to keep. In this case, presumably both branches have files with the same names but different content, and there is no shared base to work out which version is "original" and which "changed". – IMSoP Mar 18 '22 at 14:29

0 Answers0