git错误提示:fatal: detected dubious ownership in repository
fatal: detected dubious ownership in repository at 'D:/Git'
'D:/Git' is owned by:
BUILTIN/Administrators (S-1-5-32-544)
but the current user is:
COOLL/Lenovo (S-1-5-21-332913961-1909816967-542526052-1001)
To add an exception for this directory, call:
git config --global --add safe.directory D:/Git
大概翻译过来就是 致命错误:检测到仓库中存在可疑的所有权问题”(其实就是权限问题)
解决方案:
选择git仓库的文件夹右键属性——安全——高级
所有者和当前Windows登录账号不一样——更改——高级
选择立即查找——找到当前帐号——确定
勾选选项——确定
子文件夹一起更改
更改后的效果