git和idea重新安装后提交异常

场景:我重装了系统,idea装了2024.3版本的,git也重新装了,但是项目中还是有.git文件夹的,下载了idea的码云插件后,提交报错如下:

异常:Error updating changes: detected dubious ownership in repository at 'E:/ideaCode/MoveCar' To add an exception for this directory, call: git config --global --add safe. directory E:/ideaCode/MoveCar Set the environment variable GIT_TEST_DEBUG_UNSAFE_DIRECTORIES=true and run again for more information.

解决办法:打开cmd执行以下,然后重新idea中提交即可

git config --global --add safe.directory "*"

相关推荐
無限進步D5 小时前
Java 运行原理
java·开发语言·入门
難釋懷5 小时前
安装Canal
java
是苏浙5 小时前
JDK17新增特性
java·开发语言
阿里加多8 小时前
第 4 章:Go 线程模型——GMP 深度解析
java·开发语言·后端·golang
likerhood8 小时前
java中`==`和`.equals()`区别
java·开发语言·python
小小李程序员8 小时前
Langchain4j工具调用获取不到ThreadLocal
java·后端·ai
zs宝来了9 小时前
AQS详解
java·开发语言·jvm
lulu121654407811 小时前
Claude Code Harness架构技术深度解析:生产级AI Agent工程化实践
java·人工智能·python·ai编程
阿里加多11 小时前
第 1 章:Go 并发编程概述
java·开发语言·数据库·spring·golang