Today I’ve encountered the problem adding files within a LaTeX project. All generated PDF files are ignored in the project .gitignore:

.gitignore
1
*.pdf

I had to add two PDF files with graphics and didn’t want to change my ingnoring rules:

Adding ignored files with Git
1
$ git add -f file1.pdf file2.pdf

The -f switch forces Git to add ignored files. Use it!

Comments