Commit 1b8e9249 authored by Marcia Ramos's avatar Marcia Ramos

Docs: Versioned Snippets: move section below description

parent b8a955f5
...@@ -11,6 +11,44 @@ There are two types of snippets: ...@@ -11,6 +11,44 @@ There are two types of snippets:
- Personal snippets. - Personal snippets.
- Project snippets. - Project snippets.
## 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
and private. See [Public access](../public_access/public_access.md) for more information.
## Project snippets
Project snippets are always related to a specific project.
See [Project features](project/index.md#project-features) for more information.
## Create a snippet
To create a personal snippet, click the plus icon (**{plus-square-o}**)
on the top navigation and select **New snippet** from the dropdown menu:
![New personal snippet from non-project pages](img/new_personal_snippet_v12_10.png)
If you're on a project's page but you want to create a new personal snippet,
click the plus icon (**{plus-square-o}**) and select **New snippet** from the
lower part of the dropdown (**GitLab** on GitLab.com; **Your Instance** on
self-managed instances):
![New personal snippet from project pages](img/new_personal_snippet_from_project_v12_10.png)
To create a project snippet, navigate to your project's page and click the
plus icon (**{plus-square-o}**), then select **New snippet** from the upper
part of the dropdown (**This project**).
![New personal snippet from project pages](img/new_project_snippet_from_project_v12_10.png)
From there, add the **Title**, **Description**, and a **File** name with the
appropriate extension (for example, `example.rb`, `index.html`).
CAUTION: **Warning:**
Make sure to add the file name to get code highlighting and to avoid this
[copy-pasting bug](https://gitlab.com/gitlab-org/gitlab/-/issues/22870).
## Versioned Snippets ## Versioned Snippets
> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/239) in GitLab 13.0. > [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/239) in GitLab 13.0.
...@@ -61,7 +99,7 @@ master branch. ...@@ -61,7 +99,7 @@ master branch.
### Limitations ### Limitations
- Binary files are not supported. - Binary files are not supported.
- Creating or deleting branches is not supported. Only a default *master* - Creating or deleting branches is not supported. Only a default *master*.
branch is used. branch is used.
- Git tags are not supported in snippet repositories. - Git tags are not supported in snippet repositories.
- Snippets' repositories are limited to one file. Attempting to push more - Snippets' repositories are limited to one file. Attempting to push more
...@@ -70,45 +108,7 @@ than one file will result in an error. ...@@ -70,45 +108,7 @@ than one file will result in an error.
it's planned to be added in future iterations. See the [revisions tab issue](https://gitlab.com/gitlab-org/gitlab/-/issues/39271) it's planned to be added in future iterations. See the [revisions tab issue](https://gitlab.com/gitlab-org/gitlab/-/issues/39271)
for updates. for updates.
- The [maximum size for a snippet](../administration/snippets/index.md#snippets-content-size-limit) - The [maximum size for a snippet](../administration/snippets/index.md#snippets-content-size-limit)
is 50MB, by default. is 50 MB, by default.
## 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
and private. See [Public access](../public_access/public_access.md) for more information.
## Project snippets
Project snippets are always related to a specific project.
See [Project features](project/index.md#project-features) for more information.
## Create a snippet
To create a personal snippet, click the plus icon (**{plus-square-o}**)
on the top navigation and select **New snippet** from the dropdown menu:
![New personal snippet from non-project pages](img/new_personal_snippet_v12_10.png)
If you're on a project's page but you want to create a new personal snippet,
click the plus icon (**{plus-square-o}**) and select **New snippet** from the
lower part of the dropdown (**GitLab** on GitLab.com; **Your Instance** on
self-managed instances):
![New personal snippet from project pages](img/new_personal_snippet_from_project_v12_10.png)
To create a project snippet, navigate to your project's page and click the
plus icon (**{plus-square-o}**), then select **New snippet** from the upper
part of the dropdown (**This project**).
![New personal snippet from project pages](img/new_project_snippet_from_project_v12_10.png)
From there, add the **Title**, **Description**, and a **File** name with the
appropriate extension (for example, `example.rb`, `index.html`).
CAUTION: **Warning:**
Make sure to add the file name to get code highlighting and to avoid this
[copy-pasting bug](https://gitlab.com/gitlab-org/gitlab/-/issues/22870).
## Discover snippets ## Discover snippets
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment