Unlink of file Failed. Should I try again?

前端 未结 30 3835
臣服心动
臣服心动 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: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
    

提交回复
热议问题