An error of Git
Sometimes there are some problems in the process of using Git, so when you solve each problem, you need to summarize and record it, so that you won’t do it again.
A, fatal: refusing to merge unrelated nothing code>
Today, while creating a project with Git, the following error occurred when two branches were merged.
~/SpringSpace/newframe on master ⌚ 11:35:56
$ git merge origin/druid
fatal: refusing to merge unrelated histories
The key to the problem here is: fatal: refusing to merge unrelated nothing code>
you might be in the git pull code> or
git push code> are likely to encounter, this is because the two branches without relationship. So what's the solution?
Second, solutions
Behind the commands you add - allow - unrelated - nothing code>
for example:
git merge master - allow - unrelated - nothing code>
~/SpringSpace/newframe on druid ⌚ 11:36:49
$ git merge master --allow-unrelated-histories
Auto-merging .gitignore
CONFLICT (add/add): Merge conflict in .gitignore
Automatic merge failed; fix conflicts and then commit the result.
If you are a git pull code> or
git push code> to
fatal: refusing to merge unrelated nothing code>
in the same way:
git pull origin master - allow - unrelated - nothing code>
and so on, this is the perfect solution to cough up!
Read More:
- Fatal: reusing to merge unrelated histories
- fatal: refusing to merge unrelated histories
- [FAQ] after git merge, the push to Gerrit fails, indicating no new changes?
- You have not concluded your merge (MERGE_HEAD exists)
- Error: You have not concluded your merge (MERGE_HEAD exists)
- Git solves pull origin error: the following untracked working tree files would be rewritten by merge
- Git error prompt: fatal: not a git repository (or any of the parent directories):. Git
- How to solve the problem of “please enter a commit message to explain why this merge is necessary” when git merges branches?
- Please specify which branch you want to merge with
- Git push “fatal: Authentication failed ”
- Git prompts another git process sees to be running in this repository, e.g. an editor opened by
- [Git] git pull pull remote git push to remote git commit submit reject
- git clone appears fatal: index-pack failed problem solution
- Git clone appears fatal: unable to access’ https://github.com/… The solution to the problem
- How to Fix GIT Push Error
- Error: your local changes to the following files would be rewritten by merge solution
- How to solve error: failed to push some refs to ‘[email protected]:……git pull conflict
- Fatal: unable to create ‘project_ path/.git/ index.lock ‘: File exists.
- Error: Command failed: git describe –always fatal: Not a valid object name HEAD
- How to turn off merge request in gitlab