gt land¶
Merge approved pull requests.
Usage¶
Arguments¶
| Argument | Description |
|---|---|
[branch] |
Branch to land (default: current branch) |
Options¶
| Option | Description |
|---|---|
--dry-run |
Show what would happen without making changes |
--all |
Land all approved PRs in the stack |
Examples¶
Land Current Branch¶
Land Specific Branch¶
Land All Approved¶
Preview First¶
Behavior¶
- Checks PR status (must be approved and passing CI)
- Merges the PR using the provider's API
- Updates local tracking
- Optionally syncs to rebase remaining stack
Requirements¶
Before landing, a PR must:
- Have required approvals
- Pass all required status checks
- Have no merge conflicts
Merge Strategy¶
The merge strategy depends on your repository settings:
- Merge commit: Creates a merge commit
- Squash: Squashes all commits into one
- Rebase: Rebases commits onto target
Stack respects your repository's configured merge strategy.
After Landing¶
After landing a PR at the bottom of a stack:
The remaining PRs will automatically update their base branches.