What are the common files to ignore in Git?
When you add or commit files in a git repository, there are some common files you can exclude or ignore. Because these files are not part of your application or project. These files may be related to debugging log, confidential files, editor or some other tools related files.
.gitignore
is the special file where you can mention files to be ignored as plain text. You can write a pattern for files/directories one per line. Anything after the hash (#) symbols will be treated as a comment.
List of Common files to ignore:
You can simply copy following text and add in .gitignore file.
# macOS files
.DS_Store
# log files
*.log
# Node Modules
node_modules
# Netbeans project files
nbproject
# node package file
package-lock.json
Learn more about the similar topics:
Tutorials |
---|
No Content Found. |
Exercises & Assignments |
---|
No Content Found. |
Interview Questions & Answers |
---|
No Content Found. |