git忽略已经被提交的文件

来源:互联网 发布:华为怎么下载软件 编辑:程序博客网 时间:2024/06/05 12:49

问题描述

Application/Runtime已被提交到 Github,后来在.gitignore中添加了忽略

// .gitignoreApplication/Runtime

发现没有效果

modified:   Application/Runtime/Logs/Home/15_10_29.log

而且也想把 Github 中Application/RuntimeRuntime去掉。

解决方法

执行下面一个,本地并不会删除

git rm --cached Application\Runtime\*

.gitignore中添加下面一行

Application/Runtime

再 push 到 Github 后,Application/Runtime 就没有了。


0 0