Adding ignored files with Git
Today I’ve encountered the problem adding files within a LaTeX project.
All generated PDF files are ignored in the project .gitignore
:
$ cat .gitignore
*.pdf
I had to add two PDF files with graphics and didn’t want to change my ingnoring rules:
$ git add -f file1.pdf file2.pdf
The -f
switch forces Git to add ignored files. Use it!