sincecutoff.com
← all changes

glab attach uploads and references local files

Introduced 2026-09-08 · score 0.90

HOW TO USE IT

When creating or updating a GitLab work item, issue, or merge request with a local file to include, pass the file path with `--attach` to upload it and add its reference to the description.

glab work-items create --type issue --title "<title>" --attach <local-file>
glab mr create -t "<title>" --attach <local-file>
glab mr update <id> --attach <local-file>

WHY THIS HELPS

When attaching a local file in a GitLab workflow, upload and reference it with `--attach`.

REQUIREMENTS AND LIMITATIONS

  • Version: v1.117.0
  • --attach <file>: Upload a file and reference it at the end of the description. Repeat the flag for multiple files, or pass `-` to read from standard input.
  • --group: Select a group or subgroup for work item creation. The work-items docs say it cannot be combined with `--attach`.
  • --type <type> (required): Work item type; documented values include epic, incident, issue, key_result, objective, requirement, task, test_case, and ticket.
  • --title <title>: Set the work item title.
  • -t, --title <title>: Set the merge request title.
  • <id | branch>: Select the merge request to update; defaults to the currently checked-out branch.
  • Prerequisite: Authenticate `glab` with the GitLab instance; the docs direct users to run `glab auth login`.
  • Prerequisite: The `--attach` feature is experimental and might be unstable or removed.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card