Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Git: .gitignore file for LaTeX projects

View .gitignore
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
*.blg
*.dvi
*.glg
*.gls
*.ilg
*.ind
*.lof
*.lot
*.maf
*.mtc
*.mtc1
*.out
*.synctex.gz

Excellent! Thanks for this!

I might consider adding '*.synctex.gz'.

Owner

Thank you! Good idea, I added it.

Why not use this instead:

$ cat .gitignore
*
!myfile.tex

Because it's decently rare that a .tex file exists by itself, there's BibTeX files, figures, usually some sort of misc notes you want (I even have a rake file using rake-latex from Oxford Uni).

All that said, if you really do have a .tex file in isolation, that's a good solution :)

excellent, just what i need! thanks.

Thank you for this great file !
I forked it for Mac users : https://gist.github.com/871983

Cool! Thank you!

If using latexmk to manage the compile process, add *.fdb_latexmk

I added *\#* to my list to not track the emacs backup files.

aramk commented

I added *.pdf since this is an output file and not a source file. The same could apply to *.dvi.

Thanks !, very useful.

if using the pagebackref option of the hyperref package you also get a *.brf file.

I would sort it alphabetically :) Good one!

While for AUCTeX you also get files like:
region.*
prv_.fmt
prv_
.log

Thank you Stefan, this is nice and useful. You may also want to include *.lol (List of Listings), produced by the listings package.

Thank You, indeed. My "manuscript" got rather large and manually tracking changes piecemeal got unmanageable, thankfully I opted way back then to compose it in \LaTeX so now that I've been able to regenerate it from ancient source, I'll be able to track it, too.

dr0bz commented

Just what i was looking for, great! What about adding *.pdf? And for TexMaker users

*.bak
build/

is useful also.

nice. thanks!

Yay! Cheers!

Thanks!

BTW, biber creates *.bcf and *.run.xml files.

*.snm and *.nav for beamer!

Thanks

Thanks for cleaning up my fat repo!

I see multiple comments suggesting adding *.pdf, but as of yet it was not included.. Is there an argument to leave it out?

This is perfect, Thanks!

Thanks!

mmrko commented

Thanks :)

joostrijneveld: adding *.pdf to a standard .gitignore is a bad idea since pictures in latex documents often are included in pdf format.

I would also argue that it's pretty convenient for someone not interested in editing the document to have easy access to the output pdf file, without having to download any non-common packages and building it manually.

pSub commented

Thanks!

Hi,

Thanks for your sharing. I propose to add *.run.xml which is generated by biber.

pSub commented

I propose to add *.xdy which is created by xindy, an index processor. You can find the addition in my fork.

ConX commented

Thank you!

Thank you from a very new git and latex user!

i am new to git, and i want to share latex project over here, with all the figures, bib files and tex file.

thanks as well!
would it be possible to add a line that excludes the .pdf file if there is a corrisponding .tex file?

Nice, thanks for sharing. I suggest adding *eps-converted-to.pdf to remove the PDF files generated by epstopdf.

Thanks a bunch!

Thx. Some things to add:

  • *.fdb_latexmk
  • *.xml
  • *.pdf
  • *.fls
  • *.bcf
  • *.pyg

Thank you

Thanks! This is very useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.