Unlink of file Failed. Should I try again?

前端 未结 30 3756
臣服心动
臣服心动 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条回答
  •  萌比男神i
    2020-12-02 04:30

    I had this issue with .tmp files in /.git/objects/pack folder. I think something had failed during a push or pull, so I removed these temporary files and reset the HEAD to my last commit. Not sure if this is advised but it worked for me. Also git count-objects -v gave me a list of the .tmp files that didn't belong in the pack folder.

    Or to suppress the y/n messages in windows git open cmd.exe and run:

    SETX GIT_ASK_YESNO false
    

    seen here: https://twitter.com/petercamfield/status/494805475733807104

提交回复
热议问题