I started using laravel mix, and there's huge files generated by it. Should I commit those to the repo? What are the advantages and cons of both ways?
You should not add anything to the repo that can be generated at any time, for example after pull.
A clear well known example that can be added to your predicament, is node_modules
. They can always be generated by npm install
, therefore it should always be added to .gitignore
Reasons you should commit these files:
Reason why you should not commit:
If I'm working alone on a project and don't do very frequent deployments, I'd choose to commit these files.
If you have a decent deployment pipeline which can build these files on-the-fly when you need to deploy, then I would definitely not commit them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With