No, adding files to .gitignore merely tells git that the files shouldn't be added to the system using git add
for example (without -f
at least) and git status
will not show you that they are untracked.
However, because they're untracked you may lose status about them and may forget that they're important. Thus, if you delete your cloned copy of a repository that has the PDFs in them, then you've just deleted them yourself and have forgotten that they weren't part of the checked in files. Thus, you and other users that clone the repository won't get access to them.
If you're interested in storing large files in git
, you might look at git annex
and git lfs
, which offers ways to store and share large files.
Finally, my general thought on PDFs and similar large files: it's best if your repository can self-generate them during a build or similar process. If not, then you do need to track them in a versioning system somehow to ensure they're not lost (hence: git annex
or git lfs
).