// Use when user asks to "restack", "resolve conflicts", "gt restack", or mentions restack conflicts. Guides through gt restack conflicts with intelligent diagnostics and resolution.
| name | restack |
| description | Use when user asks to "restack", "resolve conflicts", "gt restack", or mentions restack conflicts. Guides through gt restack conflicts with intelligent diagnostics and resolution. |
| allowed-tools | Bash(gt restack:*), Bash(gt continue:*), Bash(git show:*), Bash(git diff:*), Bash(git log:*), Bash(git ls-tree:*), Bash(pnpm install:*), Bash(git status:*), Bash(gt log:*), Bash(rm pnpm-lock.yaml), Bash(gt add -A:*), Bash(git checkout --theirs:*), Bash(git checkout --ours:*) |
Repository status:
!git --no-pager -c color.ui=false status
Current stack:
!gt --no-color log short --stack
Check git status output above:
gt restack
Outcomes:
Analyze conflicted files from status above:
Only pnpm-lock.yaml conflicted? โ See lockfile-conflict.md
Multiple files conflicted? โ See complex-conflict.md
Unexpected errors or state? โ See troubleshooting.md
Restack completed successfully!
Next step: Force push your stack
gt stack submit --force
# Or individual branch:
git push --force-with-lease origin <branch-name>
Note: Always use --force-with-lease for safety