在通过 Git Bash 提交项目代码时输入 git status 命令后,报错:fatal: detected dubious ownership in repository at
这是因为该项目的所有者与现在的用户不一致
比如说: 该项目的所有者是 root,而当前用户是 www, 那么就会导致上面的错误
解决的办法也很简单在 git bash 中输入:
# 命令 git config --global --add safe.directory "你的目录或者文件" ;意思就是把该目录或者文件白名单安全的
git config --global --add safe.directory "*"