When I try to merge any branch in git into master I get error: addinfo_cache failed for path 'file'
.
What I do:
>git checkout master >git merge other-branch
Git gives me:
error: addinfo_cache failed for path 'file' file: unmerged (581c47f7d0e1a0bc825d528d9783ac18ee0cce27) file: unmerged (26a0c24dccd2bc2f74e20488ca01bba2fcd9cf56) file: unmerged (3be471ca5c689693339827a455f187814677642f) fatal: git write-tree failed to write a tree
>git status
yields:
On branch master Your branch is up-to-date with 'origin/master'. Unmerged paths: (use "git reset HEAD <file>..." to unstage) (use "git add <file>..." to mark resolution) both modified: file no changes added to commit (use "git add" and/or "git commit -a")
I have no idea what to do and can't find anython on the problem.
This error can occur when you have changed the core.autocrlf
config option but have not deleted and re-checked-out your working tree.
So either change core.autocrlf
back to what it was, or push up your changes, delete your repo and clone it again.
I tried editing the above answer but it does not seem to have progressed... After looking at your comment https://stackoverflow.com/users/6950750/derweh, deleting a repo is the absolute last resort. When quirky things seem to happen such as above. I found the best thing to do is reset to a past commit that has some considerable amount of delta and then checking back out the branch you need.
git reset HEAD~10 --hard
or git checkout some-other-branch
followed by
git checkout name-of-your-branch
After doing this, your working branch often appears to work again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With