gitignore 忽略文件夹

上面问题,按理说只要在.gitignore文件中加上

/dockAni/Library/

即可实现。

但是我这样做了以后却发现sourceTree中仍然会列出Library中的文件。

最后在这个帖子中找到答案:http://stackoverflow.com/questions/24410208/gitignore-does-not-ignore-folder

打开sourceTree的命令行窗口,在其中输入

git rm -r --cached Library

即可。

原文地址:https://www.cnblogs.com/wantnon/p/6124105.html