Ensure a .gitignore file is included in projects
This rule makes sure a .gitignore file is included inside the repository.
A repository should contain a .gitignore file to ensure predefined files and directories are ignored from being tracked by Git and therefore, won't be committed to the codebase.
- Prevention of human errors in your codebase
- Ensuring appropriate commits and source control additions
When does this rule fail?
When submitting a pull request to a repository w/o a '.gitignore' file in the root directory.
How to fix?
- Create a meaningful .gitignore file according to your repository requirements
- Commit and push the new .gitignore file to your branch
- Datree's policy check automatically ensures the pull request includes a .gitignore file
|Activate a policy|