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 "当前目录" 
相关推荐
郡杰1 小时前
Git基础与开发平台搭建
git·后端
钟智强3 小时前
我警告了 329 天
git·php·wordpress·webshell
乐观的冷风5 小时前
我们需要将文件添加到暂存区才能提交,而移除文件后是无法添加到暂存区的,那么怎么移除一个文件让GIT不再将其纳入版本控制呢?上图中GIT已经给出了说明:
git
tjl521314_216 小时前
Git SSH Host Key Verification Failed 问题排查与解决
运维·git·ssh
嘶哈哈哈8 小时前
[特殊字符] Git 协作指南
git
say_fall8 小时前
【Git 精品详解】企业规范:企业级开发模型、Git Flow、发版流程规范、Code Owner 制度、事故应急回滚
大数据·linux·服务器·git·学习·elasticsearch
江畔柳前堤1 天前
第13章:docker生产环境部署实战
运维·git·docker·容器·代码复审
GuHenryCheng1 天前
【ESP32】ESP-IDF开发环境搭建(cursor)
git·stm32·单片机·学习
kaka。。1 天前
GIT安装+代码推送
git
明理的路灯1 天前
安装 git 开发工具
git