4 ms·
Using a user gitignore file works if you’re responsible for your development environment. This does not work for other developers who are not responsible for th
by vegetablepotpie 2y ago
Using a user gitignore file works if you’re responsible for your development environment. This does not work for other developers who are not responsible for their development environment.
The first place to catch errant build files and artifacts from entering the repo database is the .gitignore file. The second place to catch them is the PR. The .gitignore prevents repetitive file adds from entering the PR.
What I don’t want to see in an enterprise environment is someone checking in a 100MB binary file that gets checked into dev because the team was busy and approved a PR hastily. What would be helpful is a git hook that checks the mime type of a file and decide if it should even by a type of file that should be checked into a project.
- eddiejaoude 2y agothank you for your detailed replied. The Git hook is an interesting idea, I use Git Husky for git hooks, and checking the mime type could be good to avoid files like screenshots being committed I will look into this idea. Thanks again