Allow Snippets to have no files

Proposal

It would be nice if the Snippets feature would allow the existence of files to be empty/ignored when a description is set. I typically utilize the snippet feature for reflecting Markdown content in the description field and need to include a single character in the file input to allow GitLab to accept the snippet. Otherwise, the following message is presented:

Snippets can't contain empty files. Ensure all files have content, or delete them.

While the alternative is to provide no description and place the Markdown inside the initial file, this has two undesired actions:

  • Requires creating a dummy file name with a .md extension to recognize.
  • Causes a display of a "file wrapped container" which is not as pleasing as if the Markdown content was in the description.

image

Edited Jun 21, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading