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]
- Git Pull error: Your local changes to the following files would be overwritten by merge:
- Git: How to Solve Error: Please commit your changes or stash them before you merge.
- [Solved] git Error: error: Your local changes to the following files would be overwritten by merge
- [Solved] fatal: not in a git directory Error: Command failed with exit 128: git
- Git fatal: No configured push destination. Either specify the URL from the command-line or co
- Git Pull Error:The following untracked working tree files would be overwritten by merge
- [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] Git Push Error: &fatal: the remote end hung up unexpectedly
- Git pull and Git pull origin master Warning: Pulling without specifying how to reconcile divergent branches
- Git pull code error fatal: authentication failed fo
- [Solved] Git error: bad signature 0x00000000 fatal: index file corrupt
- SourceTree Git Error: remote: HTTP Basic: Access denied fatal: Authentication failed
- How to Solve Git Error: error: failed to push some refs to……
- [Solved] error: failed to push some refs to ‘https://gitee.com/wangdxstudy/mygirl.git‘
- How to Fix Error Cannot find command ‘git‘ – do you have ‘git‘ installed and in your PATH?
- Git Push Error: failed to push some refs to ‘[email protected]: