git - error: addinfo_cache failed for path 'file'

fatal: make_cache_entry failed for path
git cherry pick fail
git merge branch to master error

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.

error: addinfo_cache failed while cherrypicking, Looks like this has something to do with the whitespace and EOL. I also got the same issue today and just used the git-->mergetool to resolve  error: addinfo_cache failed for path 'ROE/NAS/src/abc.c addinfo_cache failed while cherrypicking I also got the same issue today and just used the git

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.

error: addinfo_cache failed during merge, error: addinfo_cache failed for path 'foo/bar.h' I should caveat that my local git/​git is a little out of date because I haven't repointed it since  Git Cherry-pick Error Addinfo_cache Failed For Path. Presumably there's a fancy way to do that through three steps: Move the branch HEAD points to. Patches, suggestions and Fatal: Git Write-tree Failed To Write A Tree to make mistakes in reintegrating changes or accidentally pushing a branch into an unrelated repository.

I've recently encountered this error using 2.18.0.windows.1 git version when cherry-picking. The affected file wasn't even connected with the changes. Tried all the answers in this thread, tried disabling fscache and upgrading git to 2.21. Finally managed to resolve the issue by:

  1. Removing the affected file
  2. Resetting the state with git reset --hard origin/master (this did not work without step 1)

Git Merge Error: addinfo_cache failed for path, git merge master error: addinfo_cache failed for path '[redacted for privacy a].xml' error: addinfo_cache failed for path '[redacted for privacy  Git - error: addinfo_cache failed during merge . The Right Way To Fix Mergetool. my company this: error: addinfo_cache failed for path 'foo/bar.h' So first, is this important? Reload to it right now. Anyone trying to do pull requests Git Mergetool look into that. I advocate reverting the repo back to the previous settings

It's definetly somthing with the autocrlf like others allready said. But i have had it disabled ever since.

Sometime it's sufficient if a coworker or any tool like a mergetool or repo-frontend like gitlab, tfs, github fiddles with the line endings in a file, for example in pull requests.

easy local fix: - delete all code files - let git regenerate all files as it thinks is correct

So keep your workspace/repository with the .git folder, BUT delete all other files.

example (all code is in src)

rm -rf ./src
git reset --hard .

[ git ] error: addinfo_cache failed for path, Copy the real file and replace it. There're some modification must be committed. So we commit it again. git pull -X theirs. git add assets  Git Merge Addinfo_cache Failed For Path automatically but I'm not sure what it is. Fatal: Git Write-tree Failed To Write A Tree However if we run it with -Xours or -Xtheirs it does not.

  1. Did you try to first solve the conflicts you have on the "file" by running git mergetool, and afterwards merging your "other branch" into master?
  2. Or if you don't care about you local changes to this "file" then you could just reset it hard to the remote branch git reset --hard origin/master and afterwards do the git merge other-branch

cherry-pick failed : add_cacheinfo failed to refresh for path · Issue , Setup Which version of Git for Windows are you using? Is it 32-bit or 64-bit? error: add_cacheinfo failed to refresh for path '/Lib/ICSharpCode. Re: error: addinfo_cache failed during merge Stephen Bash < [hidden email] > writes: > I should caveat that my local git/git is a little out of date > because I haven't repointed it since k.org went down (I use it very > rarely), so there might be something newer in this area.

"Pointer file error: Unable to parse pointer" and "error , "Pointer file error: Unable to parse pointer" and "error: addinfo_cache failed for path" #1828 Error: remote: GitLab: LFS objects are missing. So here is where Git is actually falling over: error: unable to create file test-files/SavedData\OpenBCI-RAW-aaron+eva.txt: No such file or directory error: unable to create file test-files/SavedData\OpenBCI-RAW-friday_test.txt: No such file or directory Did you read the link above about valid file path characters? I’ll quote the relevant

git cherry-pick gives error: addinfo_cache failed for path, git cherry-pick gives error: addinfo_cache failed for path I was reading the manual pages of gitattributes and saw the note > When text=auto  Preferably, that the files are checked out, despite that the file name/path indeeds seems a bit off. That I am able to commit changes in irrelevant files (= in a whole other directory) without seeing those file's marked as deleted in my commit GUI.

Re: [Git] recursive merge on 'master' severely broken?, Junio C Hamano <gitster@pobox.com> To: git@vger.kernel.org Cc: in upload-pack.c error: addinfo_cache failed for path 'sha1-name.c'  Error: Unable to find git in your PATH. PS C:\Users\USER\Documents\Flut\cobabambang> git git : The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1. git

Comments
  • add_cacheinfo failed for path ... is an internal error and should not occur. Either something inside Git is broken, or something inside your computer itself is broken / failing. If the problem persists on a different computer, that would suggest it's a bug in whatever version of Git you're using; you could try using a different version of Git.
  • I just tested it on my computer at home, no problems there. I will just delete the whole .git folder at work. Hopefully that fixes it.
  • Deleting .git and cloning it new solved the problem. Thanks. Do you want to write your comment as an answer, then I will accept it.
  • Well, it's still mysterious. That's not a fix, that's a workaround. :-) The actual problem, and the correct fix, are still unknown...
  • OK thought that the message just indicates that the repository is broken. Any thanks for the help.
  • This needs more upvotes! I simply removed my working tree (but not the .git directory, obviously) and did a hard reset to the branch where I needed to cherry-picked and it worked.
  • 1. There were no conflicts, I didn't use git mergetool. 2. I tried what you suggested git reset --hard origin/master, it has no effect at all. It seems like torek's comment is right and the repository somehow broke. I deleted everything and cloned it from another machine, it seems to be working now.