diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-10-12 14:51:56 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-10-12 15:46:34 +0200 |
commit | 45418734311561bb72aa5ab7a89d81bbd5705f7a (patch) | |
tree | 0494cac471502f3c3b69f05761b55cc91ee8f2e2 /doc/user/project/git_attributes.md | |
parent | 7c07c07d7a2b93ab81964b9cd28736652da1370a (diff) | |
download | gitlab-ce-45418734311561bb72aa5ab7a89d81bbd5705f7a.tar.gz |
Added documentation chapter for Git attributes
As discussed in https://gitlab.com/gitlab-org/gitlab_git/issues/28 we'll
need to clearly document the need for .gitattributes files being encoded
using UTF-8.
[ci skip]
Diffstat (limited to 'doc/user/project/git_attributes.md')
-rw-r--r-- | doc/user/project/git_attributes.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/user/project/git_attributes.md b/doc/user/project/git_attributes.md new file mode 100644 index 00000000000..21ef94e61f7 --- /dev/null +++ b/doc/user/project/git_attributes.md @@ -0,0 +1,22 @@ +# Git Attributes + +GitLab supports defining custom [Git attributes][gitattributes] 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"](highlighting.md) for more information. + +[gitattributes]: https://git-scm.com/docs/gitattributes |