Skip to content

Cherry-pick and stash don't work with an error: add_cacheinfo failed to refresh for path '...'; merge aborting. #2781

Closed
@dropsonic

Description

@dropsonic
  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

git version 2.22.0.windows.1
cpu: x86_64
built from commit: d003d728ffa6c0006da875ec6318d3f6b28a4ddb
sizeof-long: 4
sizeof-size_t: 8
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.18362.900]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: Notepad++
Custom Editor Path: 
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
Enable Builtin Interactive Add: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

4 worktrees

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

cmd/PowerShell

git cherry-pick [commitid]
# OR
git stash pop
  • What did you expect to occur after running these commands?

Successful cherry-pick or merging the stash with the current branch

  • What actually happened instead?

An error:
error: add_cacheinfo failed to refresh for path 'WebSites/Pure/ContractBasedApiTests/test_soap.sh'; merge aborting.
The stash entry is kept in case you need it again.

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

Unfortunately, it is a private repository that cannot be shared.

There are multiple complains about this issue on the Internet:
https://stackoverflow.com/questions/48080112/git-error-addinfo-cache-failed-for-path-file
https://stackoverflow.com/questions/16112561/error-addinfo-cache-failed-while-cherrypicking
https://www.reddit.com/r/git/comments/e606ld/why_does_this_file_prevents_me_from_merging_my/

Any solution that will help to return the repo into the working state would be much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions