Courses / GitHub
3. .gitignore
Adding and customizing a .gitignore file to exclude build artifacts, secrets, and local config files from commits.
Git / Bash
.gitignore
A .gitignore file lists files and patterns Git should ignore so you don’t accidentally commit build artifacts, secrets, or local configs.
"I keep committing my local stuff and leaking credentials — there must be an easy way to stop Git from tracking certain files."
A .gitignore is a plain text file in a Git working tree that names files and glob patterns Git should treat as untracked and not show as changes to commit; it prevents noisy or sensitive files from entering commits.
"I keep committing my local stuff and leaking credentials — there must be an easy way to stop Git from tracking certain files."
A .gitignore is a plain text file in a Git working tree that names files and glob patterns Git should treat as untracked and not show as changes to commit; it prevents noisy or sensitive files from entering commits.