.gitignore for LaTeX

LaTeX auxiliary files, compiled PDFs, and bibliography cache.

Quick presets

Selected (1)
LaTeX
Your selections never leave your browser. Generation happens entirely client-side.
Raw

65 patterns · 614 B

# Generated by DevZone Tools — https://devzone.tools/tools/gitignore-generator
# Templates: LaTeX
# 2026-04-20

# ---- LaTeX ----
# LaTeX
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
*.dvi
*.xdv
*-converted-to.*
*.ps
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.run.xml
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
*.alg
*.loa
*.thm
*.nav
*.pre
*.snm
*.vrb
*.soc
*.cut
*.cpt
*.spy
*.frm
*.lox
*.swo
*.acn
*.acr
*.glg
*.glo
*.gls
*.glsdefs
*.lzo
*.lzs
*.slg
*.syg
*.syi
*.maf
*.mtc
*.mtc0
*.pyg
*.idx
*.ilg
*.ind
*.ist
*.ptc
TSWLatexianTemp_*
*.bak
*.sav

What this template ignores

Ignores all LaTeX auxiliary files (.aux, .toc, .bbl, .log, etc.), DVI/PS intermediate formats, SyncTeX files, and bibliography cache files generated during compilation.

Common additions

  • +*.pdf — if you compile PDFs and deploy separately

Frequently asked questions

Do I need to commit .gitignore?
Yes — .gitignore should be committed to the repository so all collaborators benefit from the same ignore rules.
How do I add custom patterns?
Open your .gitignore file and add the pattern on a new line. Use # for comments, * for wildcards, / to match directories, and ! to un-ignore a previously ignored path.
How do I ignore a file that is already tracked?
Adding a file to .gitignore does not remove it from tracking if it was previously committed. Run: git rm --cached <file> to stop tracking it without deleting the file locally.
Should I commit the compiled PDF?
It depends. Committing PDFs makes them accessible without requiring a LaTeX installation but increases repo size and creates noisy diffs. A common approach is to generate PDFs in CI and attach them to releases.

Looking for something else? Browse all templates →