summaryrefslogtreecommitdiff
path: root/doc/user
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-02-20 13:26:22 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-02-20 13:26:22 +0000
commitbc0b438d13f6bffd8e837f551a5415173f43f9f3 (patch)
tree0218cbd37c409551e0c1fdde938adc2319e382f7 /doc/user
parente03a7c53aedfb8f5c9afcf71e1e2e071084b3f56 (diff)
parentc9d687d6fed8ee9d0b9dfd1ebb55ddbb30b39fe2 (diff)
downloadgitlab-ce-bc0b438d13f6bffd8e837f551a5415173f43f9f3.tar.gz
Merge branch '21240_snippets_line_ending' into 'master'
Download snippets with LF line-endings by default Closes #21240 See merge request !8999
Diffstat (limited to 'doc/user')
-rw-r--r--doc/user/snippets.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/user/snippets.md b/doc/user/snippets.md
new file mode 100644
index 00000000000..417360e08ac
--- /dev/null
+++ b/doc/user/snippets.md
@@ -0,0 +1,19 @@
+# Snippets
+
+Snippets are little bits of code or text.
+
+There are 2 types of snippets - project snippets and personal snippets.
+
+## Project snippets
+
+Project snippets are always related to a specific project - see [Project features](../workflow/project_features.md) for more information.
+
+## Personal snippets
+
+Personal snippets are not related to any project and can be created completely independently. There are 3 visibility levels that can be set (public, internal, private - see [Public Access](../public_access/public_access.md) for more information).
+
+## Downloading snippets
+
+You can download the raw content of a snippet.
+
+By default snippets will be downloaded with Linux-style line endings (`LF`). If you want to preserve the original line endings you need to add a parameter `line_ending=raw` (eg. `https://gitlab.com/snippets/SNIPPET_ID/raw?line_ending=raw`). In case a snippet was created using the GitLab web interface the original line ending is Windows-like (`CRLF`).