How to add a comment in a .gitignore file?

Yes, you may put comments in there. They however must start at the beginning of a line.


The rules for the patterns you can put in the .gitignore file are as follows:
– Blank lines or lines starting with # are ignored.

The comment character is #, example:

# no .a files

Leave a Comment