In .gitattributes I see things like:
*.htm text diff=html
*.html text diff=html
*.java text diff=java
... diff=astextplain
How are those called, diff formats, diff outputs ?
Where is the list of all supported diff formats ?
Git just refers to these as "attributes" in general, and describes them in the gitattributes documentation. The diff= setting is the "diff attribute", and for whatever reason, the list of built-in attributes is in the section titled Defining a custom hunk-header:
First, in .gitattributes, you would assign the diff attribute for paths.
*.tex diff=tex
(this is where Git labels this the "diff attribute").
There are a few built-in patterns to make this easier, and
texis one of them, so you do not have to write the above in your configuration file (you still need to enable this with the attribute mechanism, via.gitattributes). The following built in patterns are available: ...
(I won't reproduce the whole list here, which is fairly long. Note that different versions of Git have different built-in patterns, so you should look at the documentation for your specific version of Git, which you should be able to view with git help gitattributes.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With