Skip to content

Instantly share code, notes, and snippets.

@kogakure
Last active December 17, 2023 08:21
Star You must be signed in to star a gist
Save kogakure/149016 to your computer and use it in GitHub Desktop.
Git: .gitignore file for LaTeX projects
*.acn
*.acr
*.alg
*.aux
*.bak
*.bbl
*.bcf
*.blg
*.brf
*.bst
*.dvi
*.fdb_latexmk
*.fls
*.glg
*.glo
*.gls
*.idx
*.ilg
*.ind
*.ist
*.lof
*.log
*.lol
*.lot
*.maf
*.mtc
*.mtc1
*.nav
*.nlo
*.nls
*.out
*.pdf
*.pyg
*.run.xml
*.snm
*.synctex.gz
*.tex.backup
*.tex~
*.thm
*.toc
*.vrb
*.xdy
*.xml
*blx.bib
.bak
.mtc
build/
@nataliefl
Copy link

Thanks a bunch!

@rumpelsepp
Copy link

Thx. Some things to add:

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

@trodrigu
Copy link

Thank you

@shreyaspotnis
Copy link

Thanks! This is very useful

@jan-glx
Copy link

jan-glx commented Apr 30, 2015

*.bcf
*.run.xml

@cciotti-ge
Copy link

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

Thanks !

@oliviaguest
Copy link

I needed to also add:

    *.nav
    *.snm
    *.vrb

@rodolphopivetta
Copy link

I add:

*.ps

@felixfbecker
Copy link

I added

*.log
*.pdf

@klauswarzecha
Copy link

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

Thanks!

@pacoaguayo
Copy link

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

Thanks! This was a good thing to share.

@philiporlando
Copy link

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

@kogakure
Copy link
Author

Sounds good 👍

@samiyuru
Copy link

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.

@linden-yuan
Copy link

Can you add *.brf (for backreferences)?

@kogakure
Copy link
Author

I’ve added most suffixes suggested here to the list and sorted it alphabetical.

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