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
# log files
# Node Modules
# Netbeans project files
# node package file

Learn more about the similar topics:
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.