当比较 git repo 克隆时,我对目录比较选项卡中 .git 文件夹及其内容的外观感到烦恼。
在“工具”->“过滤器...”对话框中,我Exclude Source Control
在FileFilters
列表中有一个过滤器。检查此文件,文件夹中有一行.git
:
def: include
d: \\\.git$ ## Git directory
为什么我.git
在比较时仍然会看到文件夹差异?
答案1
这是我为工作区定义的过滤文件。它似乎可以过滤 Git,除此之外还有其他用途:
## This is a directory/file filter template for WinMerge
name: Exclude binaries
desc: Exclude all project binaries and source control
## Select if filter is inclusive or exclusive
## Inclusive (loose) filter lets through all items not matching rules
## Exclusive filter lets through only items that match to rule
## include or exclude
def: include
## Filters for filenames begin with f:
## Filters for directories begin with d:
## (Inline comments begin with " ##" and extend to the end of the line)
f: \.ext$
d: \\subdir$
d: \.git
d: ZZZ_.*
f: libucos3.*\.a
f: *.swp
f: *.pyc