任何人都知道是否可以忽略git管理的文件结构中特定目录的所有实例.
我想要排除具有多个子模块的maven项目中的所有"目标"文件夹.我知道我可以在顶级.gitignore中明确排除它们中的每一个,但是我真的希望能够指定像**/target/*这样的模式让它自动忽略子目录中的实例吗?
这可能吗?
我正在使用msysgit,并且项目树中包含许多bin /文件夹.使用项目根目录中的.gitignore文件,我需要忽略项目树中任何位置的bin /文件夹中的所有.dll文件.我试过"bin/*.dll",但这不起作用,我认为它只是对项目根目录中的bin /文件夹起作用.
我有一个肮脏的工作树,脏,因为我对源文件进行了更改并修改了一些图像.我试图只将图像添加到索引中,所以我运行了这个命令:
git add *.png
Run Code Online (Sandbox Code Playgroud)
但是,这不会添加文件.添加了一些新的图像文件,但没有添加任何已修改/预先存在的图像文件.
是什么赋予了?
编辑:这是一些相关的终端输出
$ git status
# On branch master
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: src/main/java/net/plugins/analysis/FormMatcher.java
# modified: src/main/resources/icons/doctor_edit_male.png
# modified: src/main/resources/icons/doctor_female.png
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# src/main/resources/icons/arrow_up.png
# src/main/resources/icons/bullet_arrow_down.png
# src/main/resources/icons/bullet_arrow_up.png
no …Run Code Online (Sandbox Code Playgroud)