git - "unable to append to .git/logs/refs/heads/master"提交时

标签 git

我最近遇到了一些奇怪的错误。我安装了 Git,但这是提交更改时我的 shell 输出:

$ git commit -m 'Removing crap'
error: unable to append to .git/logs/refs/heads/master
fatal: cannot update HEAD ref

最佳答案

检查.git/logs/refs/heads/master的用户和权限

这应该可以修复它,至少在 unix 机器上是这样:

sudo chown -Rc $UID .git/

关于git - "unable to append to .git/logs/refs/heads/master"提交时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10058155/

相关文章:

git - 我可以配置 git 使其不猜测 user.email 配置设置吗?

git 相当于 hg -R?

ios - Git SourceTree trvs

带配额的机器上的 git gc

git - 从 git 中 pull 特定的提交/文件

git - 如何提供对 Composer 使用的 git 存储库的访问

git - 查看存储中的内容而不应用它

java - Eclipse 中未暂存更改,但 git 中没有更改

Git Hook : add a new file to repo if a new branch is created

ruby-on-rails - Rails 本地 Assets :precompile - is there an automated way to check for changes?