gt submit¶
Create or update pull requests for the stack.
Usage¶
Options¶
| Option | Description |
|---|---|
--dry-run |
Show what would happen without making changes |
--only <branch> |
Only submit specific branch |
--from <branch> |
Submit from branch to tip |
--to <branch> |
Submit from root to branch |
--draft |
Create PRs as drafts |
--no-draft |
Create PRs as ready for review |
Examples¶
Submit Entire Stack¶
Preview First¶
Submit Partial Stack¶
Only the current branch:
From a specific branch to tip:
From root to a specific branch:
Draft PRs¶
Behavior¶
- Pushes each branch to remote
- Creates PRs for branches without existing PRs
- Updates PRs for branches that already have PRs
- Sets correct base branches for stacked PRs
- Adds stack visualization to PR descriptions
PR Descriptions¶
Stack automatically adds a visualization to PR descriptions:
Force Push¶
Stack uses force-push (--force-with-lease) when necessary to update branches after rebasing. This is safe as long as you're the only one working on the branch.
Related Commands¶
gt sync- Sync with remotegt land- Merge PRsgt restack- Rebase branches