Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Git: .gitignore file for LaTeX projects
# https://www.toptal.com/developers/gitignore can generate .gitignore for many filetypes
*.acn
*.acr
*.alg
*.aux
*.bbl
*.blg
*.dvi
*.glg
*.glo
*.gls
*.idx
*.ilg
*.ind
*.ist
*.lof
*.log
*.lot
*.maf
*.mtc
*.mtc1
*.out
*.synctex.gz
*.toc
@tobiasschuerg
Copy link

tobiasschuerg commented Dec 9, 2014

@victorhaggqvist
Copy link

victorhaggqvist commented Dec 10, 2014

@magnli10
Copy link

magnli10 commented Jan 19, 2015

Thanks a bunch!

@rumpelsepp
Copy link

rumpelsepp commented Jan 29, 2015

Thx. Some things to add:

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

@trodrigu
Copy link

trodrigu commented Feb 21, 2015

Thank you

@shreyaspotnis
Copy link

shreyaspotnis commented Mar 29, 2015

Thanks! This is very useful

@jan-glx
Copy link

jan-glx commented Apr 30, 2015

*.bcf
*.run.xml

@cciotti-ge
Copy link

cciotti-ge commented May 3, 2015

This is great, thanks.

@bispojr
Copy link

bispojr commented May 29, 2015

Thanks... very good!

I might consider adding '*.brf'.

@SuzanaK
Copy link

SuzanaK commented Aug 13, 2015

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

@HarryLong
Copy link

HarryLong commented Oct 1, 2015

Thanks !

@oliviaguest
Copy link

oliviaguest commented Oct 13, 2015

I needed to also add:

    *.nav
    *.snm
    *.vrb

@rodolphopivetta
Copy link

rodolphopivetta commented Oct 24, 2015

I add:

*.ps

@felixfbecker
Copy link

felixfbecker commented Oct 27, 2015

I added

*.log
*.pdf

@klauswarzecha
Copy link

klauswarzecha commented Dec 16, 2015

Excellent! Thank you very much for sharing.

@mdyzma
Copy link

mdyzma commented Feb 13, 2016

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

@adamjak
Copy link

adamjak commented Sep 20, 2016

Thanks you so much. 💯 👍

@qin-nz
Copy link

qin-nz commented Oct 12, 2017

*.thm

@fernandohds564
Copy link

fernandohds564 commented Nov 11, 2017

Thanks!

@pacoaguayo
Copy link

pacoaguayo commented Nov 30, 2017

Thanks a lot!

@brainabilgh
Copy link

brainabilgh commented Dec 12, 2017

Thank you, I added some entries

*.aux
*.glo
*.idx
*.log
*.toc
*.ist
*.acn
*.acr
*.alg
*.bbl
*.blg
*.dvi
*.glg
*.gls
*.ilg
*.ind
*.lof
*.lot
*.maf
.mtc
*.out
*.bak
*.run.xml
*blx.bib
*.synctex.gz

@amix73
Copy link

amix73 commented Jan 15, 2018

How nice! Thank you very much!

@amannougrahiya
Copy link

amannougrahiya commented Mar 31, 2018

Thanks! This was a good thing to share.

@philiporlando
Copy link

philiporlando commented Jun 22, 2019

Why not just ignore everything first and whitelist directories, *.bib, and *.tex files?

@kogakure
Copy link
Author

kogakure commented Jun 23, 2019

Sounds good 👍

@samiyuru
Copy link

samiyuru commented Mar 12, 2020

TexStudio has the following extensions list in tools -> clean
log,aux,dvi,lof,lot,bit,idx,glo,bbl,bcf,ilg,toc,ind,out,blg,fdb_latexmk,fls

@cadoiz
Copy link

cadoiz commented Aug 18, 2020

.bcf
.blg
.sav

For merging artifacts you can also add
.mine
.bak
.r2
.r4

@cadoiz
Copy link

cadoiz commented Aug 18, 2020

Maybe also .out.ps?

@ArmelZy
Copy link

ArmelZy commented Jan 16, 2021

For those who use JetBrains and TeXiFy-IDEA plugin.
Create MyLatexProject/.gitignore and copy/paste this content instead:
/out/.aux
/out/
.glo
/out/.idx
/out/
.log
/out/.toc
/out/
.ist
/out/.acn
/out/
.acr
/out/.alg
/out/
.bbl
/out/.blg
/out/
.dvi
/out/.glg
/out/
.gls
/out/.ilg
/out/
.ind
/out/.lof
/out/
.lot
/out/.maf
/out/
.mtc
/out/.mtc1
/out/
.out
/out/*.synctex.gz

@olvegam
Copy link

olvegam commented Sep 5, 2022

¡great! Very useful.

¿someone have them classified by use or tool that generates those files?

Thanks in advance.

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