Comments in .gitignore?


Can you write comments in a .gitignore file?

If so, should the line be preceded with a # or some other indicator?


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

Project vs Repository in GitHub

Updates were rejected because the tip of your current branch is behind its remote counterpart