Skip to content
Home » Git refuses to merge unrelated histories

Git refuses to merge unrelated histories

Let’s start the discussion about Git refuses to merge unrelated histories in following methods.

The git command will look something like this: git pull origin master —allow-unrelated-histories

You can replace origin with the remote repository from which you’re fetching. You may also replace the master branch with any branch you want the pull request to merge into.

The concept behind —allow-unconnected-histories is that git allows you to merge unrelated branches. When there are no file conflicts, this git flag works perfectly.

Run the below command :

git pull origin master --allow-unrelated-histories

I hope the strategies listed above work for you. Happy coding and come back again.

Similar Post : How to update angular cli