Gitlab hero border pattern left svg Gitlab hero border pattern right svg

Category Vision - Snippets


Introduction and how you can help

Thanks for visiting this category page on Snippets in GitLab. This page belongs to the Editor group of the Create stage and is maintained by Kai Armstrong (E-Mail).

This vision is a work in progress, and everyone can contribute:


Snippets allow code and other types of information to be shared between people. Snippets allow users to share these small files with other users via links and via embeds outside of GitLab. In their current form Snippets only support basic text/code sharing.

Commonly Snippets are often used for smaller pieces of code that is reused among several projects. Snippets are underutilized due to their lack of standard git based functions; including commits (revisions), forks, branches and general re-usability.

At GitLab our focus on Snippets is to enable users to extract more value from the items they're sharing through git based functions.


Currently, GitLab's maturity in Snippets is minimal. Here's why:

Viability for this category would be achieved by enabling either multiple file support or versioning. Given the proposed plan would add support for both of these simultaneously, Snippets would go directly to complete.

A complete snippets category would allow users to utilize snippets in way that aligns with other git functionality. Such as allowing multiple files to be shared (e.g. a mix of Javascript, CSS, HTML) or forked (e.g. I can make a copy of something interesting I see), or remixed (e.g. I can take a cool snippet and tweak it for my own use). GitLab has solved for movingtogitlab and supports the needs of those users looking for alternatives.

Lovable snippets come when we've graduated beyond a scratchpad and sharing and into a tool with interactive abilities to share and collaborate on snippets.

What's Next & Why

Next: Version controlled snippets - Snippets should be built on top of a Git repository so that they can be versioned and support multiple files. Support for multiple files and versioning are very frequently requested, ranked 13 and 19 of all issues on the GitLab CE issue tracker.

Competitive Landscape

Snippets capabilities are currently most close to Pastebin.

The primary competitor is Gists which is a no frills way to share snippets of code that are version controlled with Git. They allow multiple files to be shared (e.g. a mix of Javascript, CSS, HTML), forked (e.g. I can make a copy of something interesting I see), and remixed (e.g. I can take a cool snippet and tweak it for my own use). By being a Git repository, they are familiar to Git users and can be used in a variety of interesting ways from the command line.

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.

If Snippets were combined with the Web IDE with client-side and server-side evaluation it would also compete with:

Analyst Landscape

Snippets and pastebins are not currently an area of analyst interest.

Top Customer Success/Sales issue(s)

Top user issue(s)

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:

Top internal customer issue(s)

Snippets are not used regularly internally, but we are working to change this in accordance to our dogfood everything approach.

Top Vision Item(s)