36

Is it possible to add comments or remarks to a .gitattributes file?

If yes, how exactly do comment lines look like?

Silicomancer
  • 8,604
  • 10
  • 63
  • 130

2 Answers2

54

# This is a comment!

in .gitattributes.

tehp
  • 5,018
  • 1
  • 24
  • 31
4

Documented in https://git-scm.com/docs/gitattributes :

That is, a pattern followed by an attributes list, separated by whitespaces. Leading and trailing whitespaces are ignored. Lines that begin with # are ignored. Patterns that begin with a double quote are quoted in C style. When the pattern matches the path in question, the attributes listed on the line are given to the path.