Error Merging - refusing to merge unrelated histories

Answered

When I try to pull or push to my GIT repo in AWS CodeCommit I get the pop-up message saying "Error Merging - refusing to merge unrelated histories".  Both "git pull" and "git push" work fine from the command line and I've confirmed that the command line git is using the same executable that Intellij uses (/usr/bin/git).  I've tried "git pull --allow-unrelated-histories" from the command line to see if that fixes the Intellij GIT plugin but still the same error pops up.  I've tried git cloning the project to another folder and restart Intellij with invalidate caches but I get the same issue.  Any ideas?

1 comment
Comment actions Permalink

Looks like you are pulling from some wrong remote when doing this from IntelliJ. Make sure you have selected correct remote and branch.

Also, check the Console tab to see the exact git command that is executed and check in the terminal.

0

Please sign in to leave a comment.