I'm about to start version controlling my LaTeX documents with Git but I haven't used either very much. I would like to version only the files needed to compile the document but I use different OS's (OSX, Windows and different distros of Linux). I did a search for a .gitignore file for LaTeX and came up with 3 different ones:
- https://gist.github.com/149016
- https://gist.github.com/871983 (a fork of the above but for Mac)
- https://github.com/github/gitignore/blob/master/LaTeX.gitignore (another for LaTeX in general)
Here's a comparison of each in alphabetical order in tabular format:
*.acn *.acn
*.acr *.acr
*.alg *.alg
*.aux *.aux .aux
*.bbl *.bbl *.bbl
*.blg *.blg *.blg
*.dvi *.dvi *.dvi
*.fdb_latexmk
*.glg *.glg *.glg
*.glo *.glo *.glo
*.gls *.gls *.gls
*.idx *.idx *.idx
*.ilg *.ilg *.ilg
*.ind *.ind *.ind
*.ist *.ist *.ist
*.lof *.lof *.lof
*.log *.log *.log
*.lot *.lot *.lot
*.maf *.maf
*.mp
*.mtc *.mtc
*.mtc1 *.mtc1
*.nav
*.nlo
*.out *.out *.out
*.pdf
*.pdfsync
*.snm
*.synctex.gz *.synctex.gz *.synctex.gz
*.tmp
*.toc *.toc *.toc
*.top
*.tui
*.vrb
# Mac IDE files
*.swp
*~
*(Autosaved).rtfd/
Backup[ ]of[ ]*.pages/
Backup[ ]of[ ]*.key/
Backup[ ]of[ ]*.numbers/
# Mac finder files and hidden folders
.DS_Store
Can anyone suggest why some might be missing from others and if it's okay just to include them all in one .gitignore file for use on all OS's?


.tex, or images or whatever) is shown by git as untracked. I guess there could be value in a universal .gitignore list, but false positives also mean files could go untracked. – ShreevatsaR May 10 '11 at 9:21git cleanwon't target files that are listed in.gitignoreunlessgit clean -xis used. – Sharpie May 10 '11 at 17:45