Guided Notes
.gitignore, .gitattributes & LFS
Ignoring files with .gitignore patterns, controlling line endings and diffs with .gitattributes, and large files with LFS.
Why ignore files?
Slide 1 / 5Some files should never be committed: β’ Secrets β .env files, API keys, passwords. β’ Generated files β build output, compiled code, dependencies such as node_modules/. β’ Personal and system files β editor settings, .DS_Store, Thumbs.db, logs.
A .gitignore file in the repository lists patterns Git should ignore. Ignored files don't appear in git status and can't be added by accident with git add --all.
