2

if I try to pull from origin this error I got: fatal: refusing to merge unrelated histories and I tried this code also git pull upstream branch --allow-unrelated-histories then I got conflict. Automatic merge failed; fix conflicts and then commit the result

1 Answers1

0

It is better to understand why you have this message.

But see if the issue persists if:

  • you clone the repository
  • switch to the right branch
  • report your work in progress in that branch
  • go on working on said branch (push/pull)
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • if I run this cmd ``` git pull origin main --allow-unrelated-histories``` this is the output. – Alex mercer Oct 04 '21 at 06:51
  • @Alexmercer It is better to start again from a new clone, rather than trying to fix the current local one: see if the issue persists in the new local clone. – VonC Oct 04 '21 at 06:52
  • CONFLICT (add/add): Merge conflict in negentropy/hooks.py Auto-merging negentropy/hooks.py CONFLICT (add/add): Merge conflict in negentropy/fixtures/workflow_state.json Auto-merging negentropy/fixtures/workflow_state.json CONFLICT (add/add): Merge conflict in negentropy/fixtures/workflow_action_master.json Auto-merging negentropy/fixtures/workflow_action_master.json CONFLICT (add/add): Merge conflict in negentropy/fixtures/workflow.json Auto-merging negentropy/fixtures/workflow.json Automatic merge failed; fix conflicts and then commit the result. – Alex mercer Oct 04 '21 at 06:53
  • @Alexmercer Exactly. Clone again, and report your existing work in the new clone. No conflict that way. – VonC Oct 04 '21 at 06:54