Menu

fatal: refusing to merge unrelated histories

While merge the two different branches one could face this issue when both the branches are not created with same parent or base branch. If still there is a need to merge or pull the code from another branch, then use the --allow-unrelated-histories with git pull command. This will ignore the histories error and forcefully pull the code from another branch.

e.g.

 git pull origin feature-new-git --allow-unrelated-histories


No comments:

Post a Comment