Branches, tags, and releases
simply gitlab branch create
Section titled “simply gitlab branch create”Create a branch.
Flags
-p, --project <value>— Project id, or its full path such as group/subgroup/project. (required; env:GITLAB_PROJECT)--dry-run— Print the request that would be sent and exit without sending it.--branch <value>— Name of the new branch. (required)--ref <value>— Branch, tag, or commit SHA to branch from. (required)
Connection
-e, --env-file <value>— Path to a .env file holding connection settings.--gitlab-url <value>— Base URL of the GitLab instance. Defaults to https://gitlab.com. (env:GITLAB_URL)--gitlab-token <value>— Personal, project, or group access token. (env:GITLAB_TOKEN)
Global
--json— the raw API payload, for scripts and agents.
Points a new branch at an existing branch, tag, or commit SHA. GitLab refuses a name that already exists rather than moving it, so this can never rewrite a branch someone else is using.
Examples
simply gitlab branch create --project group/project --branch feature/thing --ref mainsimply gitlab branch create --project group/project --branch hotfix --ref v1.2.0simply gitlab branch list
Section titled “simply gitlab branch list”List repository branches.
Flags
-p, --project <value>— Project id, or its full path such as group/subgroup/project. (required; env:GITLAB_PROJECT)--limit <value>— Maximum number of branches to return across all pages. (default:20)--search <value>— Return only branches whose name contains this term.
Connection
-e, --env-file <value>— Path to a .env file holding connection settings.--gitlab-url <value>— Base URL of the GitLab instance. Defaults to https://gitlab.com. (env:GITLAB_URL)--gitlab-token <value>— Personal, project, or group access token. (env:GITLAB_TOKEN)
Global
--json— the raw API payload, for scripts and agents.
Branches come back in GitLab order, which is alphabetical rather than by recency, so on a busy repository —search is usually what you want. The MERGED column reflects whether the branch is merged into the default branch, not into whatever you are working on.
Examples
simply gitlab branch list --project group/projectsimply gitlab branch list --project group/project --search release --limit 50simply gitlab release list
Section titled “simply gitlab release list”List releases for a project.
Flags
-p, --project <value>— Project id, or its full path such as group/subgroup/project. (required; env:GITLAB_PROJECT)--limit <value>— Maximum number of releases to return across all pages. (default:20)
Connection
-e, --env-file <value>— Path to a .env file holding connection settings.--gitlab-url <value>— Base URL of the GitLab instance. Defaults to https://gitlab.com. (env:GITLAB_URL)--gitlab-token <value>— Personal, project, or group access token. (env:GITLAB_TOKEN)
Global
--json— the raw API payload, for scripts and agents.
Releases are tags with notes and assets attached, so a project can have many tags and no releases at all. Use —json for the release notes, asset links, and the commit each release points at.
Examples
simply gitlab release list --project group/projectsimply gitlab release list --project group/project --limit 5 --jsonsimply gitlab tag list
Section titled “simply gitlab tag list”List repository tags.
Flags
-p, --project <value>— Project id, or its full path such as group/subgroup/project. (required; env:GITLAB_PROJECT)--limit <value>— Maximum number of tags to return across all pages. (default:20)--search <value>— Return only tags whose name contains this term.--order-by <value>— Field to sort by. (one of:name,updated,version)--sort <value>— Sort direction. (one of:asc,desc)
Connection
-e, --env-file <value>— Path to a .env file holding connection settings.--gitlab-url <value>— Base URL of the GitLab instance. Defaults to https://gitlab.com. (env:GITLAB_URL)--gitlab-token <value>— Personal, project, or group access token. (env:GITLAB_TOKEN)
Global
--json— the raw API payload, for scripts and agents.
Tags come back newest first by the commit date they point at. That is the commit date, not the tag creation date, so a tag cut today on an old commit sorts by the old commit — use —order-by name if you need a deterministic order instead.
Examples
simply gitlab tag list --project group/projectsimply gitlab tag list --project group/project --search v1. --limit 50