Add comments/remarks to .gitattributes
Asked Answered
S

2

41

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

If yes, how exactly do comment lines look like?

Sori answered 28/11, 2016 at 15:27 Comment(0)
D
59

# This is a comment!

in .gitattributes.

Duma answered 28/11, 2016 at 16:42 Comment(3)
Thanks. Is this documented somewhere? I couldn't find it.Sori
A line starting with # serves as a comment. Put a backslash ("\") in front of the first hash for patterns that begin with a hash. From: git-scm.com/docs/gitignoreDuma
@Duma That's gitignore not gitattributesEthaethan
R
6

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.

Rasheedarasher answered 1/4, 2021 at 13:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.