24 lines
495 B
Markdown
24 lines
495 B
Markdown
# .gitignore for /etc/nginx/ (and similar system config dirs)
|
|
|
|
Patterns to exclude from a system config git repo:
|
|
|
|
```
|
|
# Nginx log files
|
|
*.log
|
|
access.log
|
|
error.log
|
|
|
|
# Backup files (generated by config management or manual edits)
|
|
*.bak-*
|
|
|
|
# Generated/temporary files
|
|
*.swp
|
|
*.swo
|
|
*~
|
|
.DS_Store
|
|
Thumbs.db
|
|
```
|
|
|
|
The `*.bak-*` glob is critical — nginx config tools and manual edits often create timestamped
|
|
backups like `nginx.conf.bak-20260707-184147`. Without this, every backup pollutes the repo.
|