I have several projects that have a large number of files that, when processed, generate other files. There is no need to track the generated files, in fact, in some cases you
Several simple solutions:
.pdf
) to .gitignore
as *.pdf
, and git add -f
those version-this-one.pdf
that should be versioned, git
will keep track of those (need a bit of care). The *.pdf
is really a glob, so you could exclude, say, PDFs whose hames start with uppercase by [A-Z]*.pdf
.*.pdf
for all PDFs, and !version-this-one.pdf
to exclude one from the excluded set (can also use a pattern here).gitignore
. Need to keep it up to date (not too bad, if a new one shows up, git
will consider it untracked, just add it then)..gitignore
: git
searches first in this directory's .gitignore
, if not found in the parent's, ... As you can exclude patterns with !
, this stops a search there. Check out gitignore(5)
.