我正在从事机器人框架自动化项目。突然间 git commit 不起作用我在提交命令时遇到以下错误
**fatal: cannot update the ref 'HEAD': unable to append to '.git/logs/HEAD': Bad file descriptor**
我在 Windows 机器上工作。到目前为止,我已经完成了 4 次提交,代码在 Repo 中。通过最新的更改,提交不会发生上述错误我已经解决了堆栈溢出中引用的几个问题,但我可以解决它。
请帮助我解决这个问题
我使用命令
git commit -a -m "description"
或 git commit -m "description"
它说 sudo 命令对我都不起作用
> $ sudo chown -R useremail .git/
> bash: sudo: command not found
最佳答案
当您不小心创建了具有 root 权限的分支时,就会发生这种情况。最好在本地检查 .git 的所有权权限,即 ls -la .git/refs/heads/应该归用户所有,而不是 root。
关于github - 致命的 : cannot update the ref 'HEAD' : unable to append to '.git/logs/HEAD' : Bad file descriptor,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53223725/