which folders/files should be excluded in .gitignore file?
I’m creating a project consists of:
- /node_modules => contains dependencies
- /dist => contains the compiled .js & .d.ts files
- /src => contains .ts files (the main project)
- /test => contains .js & .ts just for testing
I usually exludes the /node_modules & /test but not sure to exclude the /src.
Any idea?
>Solution :
You should ignore any file that is generated. If I download your project, I can use package.json to generate node_modules, so ignore node_modules.
But if I download your project and it doesn’t have src will I still be able to generate src? Most likely not, as this is probably code you have written so put it up.