1. Problem
fatal: refusing to merge unrelated histories
2. Scene
Merge other branches into master branch
3. Reason
The two branches are two different versions with different commit histories, so an error is reported.
4. Solutions
Allow unrelated historical commits and force merges, the code is as follows:
git pull origin master --allow-unrelated-histories
Read More:
- [Solved] Git Error: fatal: refusing to merge unrelated histories
- Git Error: refusing to merge unrelated histories [How to Solve]
- [Solved] Git submits locally to the remote warehouse Error: failed to push some refs to…
- [Solved] IDEA Git Update Error: Master has no tracked branch
- Local repository upload to remote repository error: failed to push some refs to ‘https://hub.fastgit.org/zhizhangxuezhang/ui-test.git‘
- [Solved] error: Pulling is not possible because you have unmerged files
- How to Solve Git Error: error: failed to push some refs to……
- Git pull and Git pull origin master Warning: Pulling without specifying how to reconcile divergent branches
- [Solved] Mac Install homebrew Error: error: Not a valid ref: refs/remotes/origin/master
- error: src refspec master does not match any. [How to Solve]
- [Solved] Git error: inflate: data stream error (invalid block type) error: corrupt loose object
- [Solved] error: failed to push some refs to ‘https://gitee.com/wangdxstudy/mygirl.git‘
- Git fatal: No configured push destination. Either specify the URL from the command-line or co
- Git Push Error: failed to push some refs to ‘[email protected]:
- Git Pull Error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errfno 10054
- Git Pull error: Your local changes to the following files would be overwritten by merge:
- [Solved] Git error: refname refs/heads/master not found
- [Solved] Error: SRC refspec master doors not match any
- hint: Updates were rejected because the remote contains work that you do To XXX