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
@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