Unlink of file Failed. Should I try again?

前端 未结 30 3508
臣服心动
臣服心动 2020-12-02 03:44

Something wrong is going on with one of the files in my local git repository. When I\'m trying to change the branch it says:

Unlink of file \'templates/media         


        
相关标签:
30条回答
  • 2020-12-02 04:36

    I had this same error and closing the app which had the file open solved it. I was able to go back and press "Y"

    0 讨论(0)
  • 2020-12-02 04:37

    On Windows, saw this error on a git clone of a (fairly large) repo. Closed SmartGit and paused my backup software (CrashPlan), and after that it worked. Not sure which of the 2 did the trick, but if running either, this might do it for you too.

    0 讨论(0)
  • 2020-12-02 04:38

    I ran into this issue in Windows, you might want to run the git bash as an administrator and then perform the desire commands, that solved the issue for me.

    0 讨论(0)
  • 2020-12-02 04:39

    this solution from here worked for me:

    This is a Windows specific answer, so I'm aware that it's not relevant to you... I'm just including it for the benefit of future searchers.

    In my case, it was because I was running Git from a non-elevated command line. "Run as Administrator" fixed it for me.

    0 讨论(0)
  • 2020-12-02 04:39

    As i am using gitkraken and command prompt, i ran into the same issue. And then i run git gc command it resolved my problem. So i am happy and want share some of the points which might be helpful.

    What git gc will do ?

    git gc removing unreachable objects which may have been created from prior invocations of git add.

    When to run git gc?

    From doc, users are encouraged to run this task on a regular basis within each repository to maintain good disk space utilization and good operating performance.

    How to make it auto-configurable?

    Some git commands may automatically run git gc; see the --auto flag below for details. If you know what you’re doing and all you want is to disable this behavior permanently without further considerations, just do

    git config --global gc.auto 0
    
    0 讨论(0)
  • 2020-12-02 04:39

    I got this problem in Windows. I closed my IDE (Android Studio) and selected YES in git shell. It worked.

    0 讨论(0)
提交回复
热议问题