git error: changes to the following files would be overwritten by checkout:.idea/workspace.xml
报错信息
error: Your local changes to the following files would be overwritten by checkout:.idea/workspace.xml
解决办法
临时解决
git status
git add .idea/workspace.xml
git commit -m ".idea/workspace.xml"
git push
git忽略modified: .idea/workspace.xml
git rm -r --cached .idea/*
# 编辑.gitignore
vim .gitignore
# 在gitignore中加入 .idea/
.idea/
# 退出编辑
:wq
# 提交
git commit -m "忽略警告"
还没有评论,来说两句吧...