Keep your repository neat and clean is a mandatory repository requirement, same as readable documentation and a good code, preferably useful. So, one of the first things I do in a new project is a .gitignore file.
Naturally, different languages and projects have quite a different project structure and file names, but I'm about to show you my list for the Ansible Tower projects.
- I always skip all backups and runtime leftovers.
- I ignore entire roles/ folder content for the Ansible Tower projects, except the list of requirements.
- All files that may contain plain-text passwords. Keep passwords in vaults, guys.
- Most common binaries. Git is not the best repo for that kind of content.
Image source: https://www.flickr.com/photos/7729940@N06/6441399337