git忽略文件

最近使用 react tool的工具来将jsx解释成js。

但是会在js文件夹里生成 .module-cache文件夹。提交的时候老是一大堆的缓存,手动去删太麻烦了。就在git里配置了下忽略。在这里记下 省得忘记了。

 

 

进入 项目根目录  然后用vi打开 ./.git/info/exclude

 

在后面添加 需要忽略的文件就可以了。

 

# git ls-files --others --exclude-from=.git/info/exclude

# Lines that start with '#' are comments.

# For a project mostly in C, the following would be a good set of

# exclude patterns (uncomment them if you want to use them):

# *.[oa]

# *

.DS_Store

.module-cache

posted @ 2015-07-22 17:25  cliffBear  阅读(207)  评论(0编辑  收藏  举报