|Content Last Reviewed|| |
This direction is a work in progress, and everyone can contribute:
GitLab Snippets allow users to share small bits of code and text by directly linking, downloading, or embedding them in web apps within a
<script> HTML tag.
Commonly Snippets are often used for smaller pieces of code that are reused among several projects, additional documentation for specific one-off scripts/functions and instructions for using the main project.
We want to make snippets a more valuable tool in the engineering toolkit by first making each snippet behave more like a lightweight Git repository including support for multiple files. Once we've done that we'll work on improving collaboration with multiple users, sharing snippets in and out of GitLab and adding the ability to execute snippets.
Snippets are primarily targeted at engineering personas who are looking for ways to quickly share bits of code and information with other users. GitLab personas that represent this are:
Currently, users of snippets have strong mental models of expected functionality based on existing competitors in the market. As new features are added to GitLab snippets to further running code or creating simple prototypes it will be important to gain feature parity and then build on top of that to increase adoption of the product.
We want GitLab to be the first choice for developers looking to share or demo small samples and prototypes with other users either within their team on GitLab or externally via links and embeds. Adding the ability to version control snippets and support multiple files will be important as we continue to expand capabilities.
Once snippets behave like other
We also want snippets to follow standard embed capabilities so they can be used outside of GitLab easily. These enhancements will help to further make snippets a valuable tool for sharing knowledge across the ecosystem.
In Progress: Snippets with multiple files - Snippets sometimes need more than one file to properly convey value. Adding support for multiple files brings us closer to parity with the market and supports users as one of the top 10 requested features for GitLab.
Next: Snippet Visiblity and Permissions - Collaboration in Snippets are limited by the current permission models. We want to further collabartion and will start with aligning project based snippet permissions with projects.
Currently, GitLab's maturity in Snippets is viable. Here's why:
A complete snippets category would allow users to utilize snippets in way that aligns with other
git functionality. Snippets can have multiple files that are easily versioned and shared with other users. GitLab has solved for
movingtogitlab and supports the needs of those users looking for alternatives.
Lovable snippets build upon
git support and expand the collaboration of Snippets inside of projects and groups. Project members can collaborate on the same snippet and groups can use and share those snippets across projects. Snippets will be the common way to communicate code across issue comments and wiki's within GitLab and outside of GitLab in other documentation.
Snippets capabilities are currently most close to Pastebin.
A range of clever tools have since been built on top of Gists including:
Atlassian has Bitbucket Snippets which is very similar to Gists, supporting Git and Mercurial.
Other business built completely on Snippets are:
If Snippets were combined with the Web IDE with client-side and server-side evaluation it would also compete with:
Snippets and pastebins are not currently an area of analyst interest.
Snippets in their current form lack feature parity with Github's Gists or Bitbucket's Snippets with both supporting multiple files and the former also supporting forks. The following two features are some of the most requested, particularly by users movingtogitlab:
Snippets are not used regularly internally, but we are working to change this in accordance to our dogfood everything approach.