Git Attributes
GitLab supports defining custom Git attributes such as what files to treat as binary, and what language to use for syntax highlighting diffs.
To define these attributes, create a file called .gitattributes
in the root
directory of your repository and push it to the default branch of your project.
Encoding Requirements
The .gitattributes
file must be encoded in UTF-8 and must not contain a
Byte Order Mark. If a different encoding is used, the file’s contents will be
ignored.
Syntax Highlighting
The .gitattributes
file can be used to define which language to use when
syntax highlighting files and diffs. See “Syntax
Highlighting” for more information.
Help and feedback
If there's something you don't like about this feature
To propose functionality that GitLab does not yet offer
To further help GitLab in shaping new features
If you didn't find what you were looking for
If you want help with something very specific to your use case, and can use some community support
POST ON GITLAB FORUM
If you have problems setting up or using this feature (depending on your GitLab subscription)
REQUEST SUPPORT
To view all GitLab tiers and features or to upgrade
If you want to try all features available in GitLab.com
If you want to try all features available in GitLab self-managed
If you spot an error or a need for improvement and would like to fix it yourself in a merge request
EDIT THIS PAGE
If you would like to suggest an improvement to this doc