glab-stack
Manage stacked merge requests for complex multi-part changes. Use when creating dependent MRs, managing MR stacks, or working with multi-layer changes. Triggers on stack, stacked MRs, dependent MRs, MR stack, stacked changes.
What this skill does
# glab stack
## Overview
```
Stacked diffs are a way of creating small changes that build upon each other to ultimately deliver a feature. This
kind of workflow can be used to accelerate development time by continuing to build upon your changes, while earlier
changes in the stack are reviewed and updated based on feedback.
This feature is experimental. It might be broken or removed without any prior notice.
Read more about what experimental features mean at
https://docs.gitlab.com/policy/development_stages_support/
Use experimental features at your own risk.
USAGE
glab stack <command> [command] [--flags]
EXAMPLES
$ glab stack create cool-new-feature
$ glab stack sync
COMMANDS
amend [--flags] Save more changes to a stacked diff. (EXPERIMENTAL)
create Create a new stacked diff. (EXPERIMENTAL)
first Moves to the first diff in the stack. (EXPERIMENTAL)
infer <revision-range> Add layers to a stack based on a range of commits. (EXPERIMENTAL)
last Moves to the last diff in the stack. (EXPERIMENTAL)
list Lists all entries in the stack. (EXPERIMENTAL)
move Moves to any selected entry in the stack. (EXPERIMENTAL)
next Moves to the next diff in the stack. (EXPERIMENTAL)
prev Moves to the previous diff in the stack. (EXPERIMENTAL)
reorder Reorder a stack of merge requests. (EXPERIMENTAL)
save [--flags] Save your progress within a stacked diff. (EXPERIMENTAL)
switch <stack-name> Switch between stacks. (EXPERIMENTAL)
sync Sync and submit progress on a stacked diff. (EXPERIMENTAL)
FLAGS
-h --help Show help for this command.
-R --repo Select another repository. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```
## Quick start
```bash
glab stack --help
```
## Current behavior
`glab stack infer <revision-range>` creates or appends stack layers from selected commits in a Git revision range. The start of the range must resolve to a branch name, not a relative ref such as `HEAD~5`, because the base branch is recorded in stack metadata.
```bash
# Infer stack layers from commits between main and the current branch
glab stack infer main..HEAD
# Infer from a feature branch that diverged from develop
glab stack infer develop..HEAD
# Create a new stack with a specific name
glab stack infer --name feature-stack main..HEAD
```
`glab stack sync` supports `--update-base`, `--assignee`, `--label`, `--reviewer`, and `--skip-mr-creation`.
```bash
# Sync stack and rebase onto the latest base branch
glab stack sync --update-base
# Sync/push existing stack work without opening MRs for branches that do not have one yet
glab stack sync --skip-mr-creation
# Sync stack and set MR metadata during submission
glab stack sync --assignee @owner --reviewer @reviewer --label backend
# Multiple reviewers can be repeated or comma-separated
glab stack sync --reviewer user1 --reviewer user2
glab stack sync --reviewer user1,user2
```
Use `--update-base` when the base branch (for example `main`) has moved and you want to rebase the entire stack before pushing.
Use `--skip-mr-creation` when you want to push amended stack branches and clean up merged/closed entries but intentionally avoid opening new merge requests for stack layers that do not have one yet.
Use `--assignee`, `--reviewer`, and `--label` when you want `glab stack sync` to submit the stack's merge requests with ownership and routing metadata in the same step.
## Subcommands
See [references/commands.md](references/commands.md) for full `--help` output.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.