Can you write comments in a .gitignore file?
.gitignore
If so, should the line be preceded with a # or some other indicator?
#
Do git help gitignore
git help gitignore
You will get the help page with following line:
A line starting with # serves as a comment.