5

When comparing git repo clones, I am annoyed by the appearance of the .git folder and its contents in the directory compare tab.

In the Tools -> Filters... dialog, I have the Exclude Source Control filter in the FileFilters list. Examining this file, there is a line for the .git folder:

def: include
d: \\\.git$ ## Git directory

Why do I still get the .git folder diffs in my compares?

ysap
  • 2,620
  • 12
  • 50
  • 74

1 Answers1

5

This is a filter file I defined for my workspace. It seems to work for filtering Git, among other things:

## 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
ysap
  • 2,620
  • 12
  • 50
  • 74
  • The files (last 2 lines) should be : `f: \.swp$` (not `f: *.swp`) and `f: \.pyc$` (not `f: *.pyc`) – otter.pro Jul 14 '21 at 19:33
  • Am I going crazy or should this be "def:exclude", NOT "def:include" (as in the example now)???? – tbone Oct 18 '22 at 18:53
  • @tbone I think the intention is to display all the files that are not filtered-out by these rules. – ysap Oct 18 '22 at 19:40