The hidden file .gitignore will allow you to decide which files are in your local repository that you do not want to go up to the remote repository, as the name says they will be ignored even if you make any changes to them.
For example, certain files that are automatically generated by a particular programming language or even files with credentials as an example, this depends on each case of course.
Something interesting with the documents .gitignore is that allows you to use certain tricks. For example, ignoring all files with a certain extension can be done as follows:
*.pdf
You can access this github repository:
https://github.com/github/gitignore
In it are several files . gitignore for various programming languages such as java, javascript, python and others that I believe will help you and personally use and I end up adding other things.
I hope I helped you
No need to use. See this. For Nodejs it is convenient to ignore the folder
node_modules
because anyone who has the code can donpm install
to install the dependencies.– chriptus13
gitignore is used to prevent you from deleting unnecessary project files. Every programming language has some files that are generated when you compile the project but these files are not useful for those who download and run the project and in these cases are defined files or folders that should be disregarded when you are Versionar something.
– Rafael Chagas
Related: Typescript files in version history
– Rafael Tavares
puts in it what ignore, depends on the project, jar files, exe, dll, etc
– Ricardo Pontual