git error: changes to the following files would be overwritten by checkout:.idea/workspace.xml

缺乏、安全感 2022-11-29 05:40 232阅读 0赞

报错信息

  1. error: Your local changes to the following files would be overwritten by checkout:.idea/workspace.xml

解决办法

临时解决
  1. git status
  2. git add .idea/workspace.xml
  3. git commit -m ".idea/workspace.xml"
  4. git push
git忽略modified: .idea/workspace.xml
  1. git rm -r --cached .idea/*
  2. # 编辑.gitignore
  3. vim .gitignore
  4. # 在gitignore中加入 .idea/
  5. .idea/
  6. # 退出编辑
  7. :wq
  8. # 提交
  9. git commit -m "忽略警告"

发表评论

表情:
评论列表 (有 0 条评论,232人围观)

还没有评论,来说两句吧...

相关阅读