代码之家  ›  专栏  ›  技术社区  ›  kittygirl

如何从“git ls files--others--exclude standard”中排除指定的文件夹和文件?

git
  •  0
  • kittygirl  · 技术社区  · 6 年前

    我的系统是带有git的centos 7.4 1.8 .

    我知道 git ls-files --others --exclude-standard > transfer_list 将列出所有未跟踪的文件( 还包括空文件夹 )
    下一步,我想排除整个文件夹 idea 文件 .scrutinizer.yml transfer_list .

    我的剧本如下:

    git ls-files --others --exclude-standard --exclude=idea/ --exclude=.scrutinizer.yml > transfer_list  
    

    我不确定是否 --exclude= 语法与 ,gitignore .
    我的剧本有问题吗?

    0 回复  |  直到 6 年前