本文介绍了“无法附加到.git / logs / refs / heads / master”当提交时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
最近我一直有一些奇怪的错误。我有一个Git的工作安装,但是当提交更改时,这是我的shell输出: $ git commit -m'清除废话'
错误:无法附加到.git / logs / refs / heads / master
致命:无法更新HEAD ref
解决方案
检查用户和 .git / logs / refs / heads / master
这应该可以解决它,至少在unix机器上:
sudo chown -Rc $ UID .git /
I've been having some strange errors lately. I have a working install of Git, but this is my shell output when committing changes:
$ git commit -m 'Removing crap'
error: unable to append to .git/logs/refs/heads/master
fatal: cannot update HEAD ref
解决方案
Check the user and permission on .git/logs/refs/heads/master
This should might fix it it, at least on a unix machine:
sudo chown -Rc $UID .git/
这篇关于“无法附加到.git / logs / refs / heads / master”当提交时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!