git 问题 --- fatal: detected dubious ownership in repository at

在通过 Git Bash 提交项目代码时输入 git pull 或git add . 命令后,报错:fatal: detected dubious ownership in repository at

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

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

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

bash 复制代码
git config --global --add safe.directory "*"

或者

bash 复制代码
git config --global --add safe.directory "当前目录" 
相关推荐
muddjsv9 小时前
Git 代码同步与协作的核心命令全解析
git
历程里程碑10 小时前
2. Git版本回退全攻略:轻松掌握代码时光机
大数据·c++·git·elasticsearch·搜索引擎·github·全文检索
果然_15 小时前
为什么你的 PR 总是多出一堆奇怪的 commit?90% 的人都踩过这个 Git 坑
前端·git
yyuuuzz16 小时前
独立站搭建:从入门到避坑实战
前端·git·github
splage17 小时前
Nginx 反向代理之upstream模块以及完整配置反向代理示例
git·nginx·github
阿崽meitoufa18 小时前
hermes-agent安装到本地 Git方法
git·hermes·hermes-agent
云攀登者-望正茂20 小时前
特性分支合并develop引发的污染问题
git
就叫年华吧丶1 天前
Git Bash、CMD 与 PowerShell 的区别详解
linux·git·命令行·powershell·cmd·gitbash
白玉cfc1 天前
Git提交规范
git·github
电化学仪器白超2 天前
小乌龟Git全程图形化操作指南:嵌入式本地版本管理与Gitee私有云备份实战
git·python·单片机·嵌入式硬件·物联网·gitee·自动化