解决Git报错:fatal: detected dubious ownership in repository at

小明 2025-05-05 11:58:48 11

在通�index.php/tags-41973.html" class="superseo">� Git Bash 提交项目代码时输入 git add . 命令后,报错:fatal: detected dubious ownership in repository at

()

这是因为该项目的所有者与现在的用户不一致

比如说: 该项目的所有者是 Administrator,而当前用户是 qiuye, 那么就会导致上面的错误

()

解决的办法也很简单在 git bash 中输入

git config --global --add safe.directory "*"
The End
微信