Book Image

Gitlab Cookbook

By : Jeroen van Baarsen
Book Image

Gitlab Cookbook

By: Jeroen van Baarsen

Overview of this book

Table of Contents (16 chapters)
GitLab Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The power of snippets


Whenever you want to store a little piece of code or just want to share it, you might wonder where you're going to store it. GitLab tries to solve this issue by providing something called snippets. Snippets are little pieces of code that get stored along with the project.

Snippets are disabled by default. To enable them, go to the project settings page, and at the bottom under the heading Features, you see a checkbox for Snippets. Click on it and save the changes.

You now have a new menu item called Snippets, as shown in the following screenshot. When you go to that page, you see a button to add a new snippet. Once you've added the snippet, it will allow people in the project to see it and also comment on the snippet.