0

I have a large project that I use sparse checkout to exclude one directory (which is quite large). However, when I use git log, the commit in the directory that I already excluded with sparse checkout will show up, polluting my real interests.

The answer given for this question by specifying one directory doesn't work for me since I need to exclude one directory but include many. I came from perforce where if I specify ..., it will not include files or directories that were excluded by my p4 client spec.

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135

1 Answers1

0

Use the exclude option with pathspecs. For instance:

$ git log --first-parent --name-status -- ':(exclude)plugin/'

in a clone of the syntastic repository doesn't show commit 69b0c3e85a319ad21f560d7b25524cf02921be82, while git log without the exclusion does show it.

torek
  • 448,244
  • 59
  • 642
  • 775