8

I'd like to set up a global .gitignore file in my home suitable for working with TeX files. So typical TeX junk files such as *.log, *.aux, *.synctex.gz would go in it.

The next step, however, is ignoring the compiled somefile.pdf if the source file somefile.tex is present. So my question is:

Is there a syntax in .gitignore that I can use to tell it to ignore somefile.pdf only if somefile.tex is present?

1 Answer 1

4

No, I don't see this feature in gitignore man page.

I would rather:

  • ignore all *.pdf in your global .gitignore file
  • run periodically a script updating a .gitignore file in any directory where a pdf file is found without a matching .tex file

    !afile.pdf

That would make the 'afile.pdf' not ignored in that specific directory.

1
  • 1
    Not the answer that I hoped for, but "no" is still an answer. Accepting this, thanks. Apr 3, 2012 at 9:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .