Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Git: .gitignore file for LaTeX projects
*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
*.blg
*.dvi
*.glg
*.gls
*.ilg
*.ind
*.lof
*.lot
*.maf
*.mtc
*.mtc1
*.out
*.synctex.gz

cflewis commented Jun 24, 2010

Excellent! Thanks for this!

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

Owner

kogakure commented Jun 25, 2010

Thank you! Good idea, I added it.

Why not use this instead:

$ cat .gitignore
*
!myfile.tex

cflewis commented Aug 2, 2010

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.

rbochet commented Mar 16, 2011

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

Cool! Thank you!

jberger commented Jun 17, 2011

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 Jul 1, 2012

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

Thanks !, very useful.

TKAB commented Sep 9, 2012

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

agravier commented Apr 7, 2013

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 Jun 21, 2013

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.

palday commented Nov 18, 2013

*.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!

denisrmp commented Apr 1, 2014

Thanks!

mmrko commented Apr 3, 2014

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 Apr 13, 2014

Thanks!

Hi,

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

pSub commented Apr 25, 2014

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

ConX commented Jul 16, 2014

Thank you!

ahsegar commented Jul 28, 2014

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.

frschu commented Sep 6, 2014

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

jan-glx commented Apr 30, 2015

*.bcf
*.run.xml

This is great, thanks.

bispojr commented May 29, 2015

Thanks... very good!

I might consider adding '*.brf'.

SuzanaK commented Aug 13, 2015

I usually add *.tex~ and *.tex.backup.

Thanks !

I needed to also add:

    *.nav
    *.snm
    *.vrb

I add:

*.ps

I added

*.log
*.pdf

Excellent! Thank you very much for sharing.

mdyzma commented Feb 13, 2016

*.brf
*.bst
*.nls
*.nlo

adamjak commented Sep 20, 2016

Thanks you so much. 💯 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment