git有关无法取消链接git对象的警告。我该如何解决这个问题? [英] git warnings about unable to unlink git objects. How do I resolve this?

查看:406
本文介绍了git有关无法取消链接git对象的警告。我该如何解决这个问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我做一个git提交时,我看到以下内容:

When I do a git commit I see the following

>$ git commit -a
warning: unable to unlink .git/objects/63/tmp_obj_kK6IC9: Invalid argument
warning: unable to unlink .git/objects/2c/tmp_obj_SFNGla: Invalid argument

我仍然可以执行git commit。然而,我想知道如何摆脱警告。

I can still perform git commit. However, I want to know how to get rid of the warnings.

推荐答案

解决方法是打开终端,转到你的git repo,cd到.git文件夹中,然后键入 chflags -R nouchg * 。如果那是问题,那么在那之后,你的git命令将正常工作。

The fix is to open a terminal, go to your git repo, cd into the .git folder, and then type chflags -R nouchg *. If that was the issue, then after that, your git commands will work as normal.

这篇关于git有关无法取消链接git对象的警告。我该如何解决这个问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆