Skip to content

Instantly share code, notes, and snippets.

@kogakure
Last active December 17, 2023 08:21
Show Gist options
  • Save kogakure/149016 to your computer and use it in GitHub Desktop.
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/
@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