赞
踩
发现远程仓库中的.idea下有2个文件,而.idea文件夹已经在.ignore中忽略了
所以现在要撤销对这两个文件的版本控制
展示要删除的文件表预览
$ git rm -r -n --cached ".idea"
rm '.idea/misc.xml'
rm '.idea/modules.xml'
执行删除命令
$ git rm -r --cached ".idea/"
rm '.idea/misc.xml'
rm '.idea/modules.xml'
提交,并加注释
$ git commit -m "remove .idea folder all file out of control"
[master 3bdaac83] remove .idea folder all file out of control
2 files changed, 54 deletions(-)
delete mode 100644 .idea/misc.xml
delete mode 100644 .idea/modules.xml
提交到远程服务器
$ git push origin master
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 482 bytes | 0 bytes/s, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2)
remote: Updating references: 100% (1/1)
To http://192.168.x.x:xxx/r/xx.git
a3da5454..4c6b2261 master -> master
现在远程服务器就没有.idea文件了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。