Tips & Tricks¶
Power user tips for getting the most out of Stack.
Navigation Shortcuts¶
Quick Stack Overview¶
Jump Around¶
gt top # Go to newest branch
gt bottom # Go to oldest branch
gt down 3 # Skip 3 branches down
gt checkout <partial-name> # Fuzzy match
Efficient Editing¶
Amend Workflow¶
Partial Staging¶
Fixup Commits¶
Submission Tips¶
Preview Before Submit¶
Partial Submission¶
# Just the current branch
gt submit --only .
# From branch to tip
gt submit --from feature/ready
# Up to a branch
gt submit --to feature/reviewed
Draft Mode¶
Sync Strategies¶
Morning Routine¶
Watch for Merges¶
Undo Mistakes¶
Undo Last Action¶
Undo Multiple¶
Redo if Needed¶
Shell Aliases¶
Add to your .bashrc or .zshrc:
# Quick aliases
alias gs='gt status'
alias gl='gt log'
alias gll='gt ll'
alias gup='gt up'
alias gdn='gt down'
alias gtop='gt top'
alias gbot='gt bottom'
alias gsync='gt sync'
alias gsub='gt submit'
# Workflow aliases
alias gnew='gt create'
alias gdone='gt submit && gt sync'
Git Integration¶
Check Diff Against Parent¶
Interactive Rebase (Carefully)¶
Templates¶
List Available¶
Create Custom Stack¶
gt create --template feature my-feature
# Creates: my-feature/types, my-feature/impl, my-feature/tests
Debugging¶
Verbose Output¶
Check Configuration¶
Auth Status¶
Performance Tips¶
Large Repositories¶
Many Branches¶
Common Patterns¶
Bug Fix in Stack¶
# Find bug while working on feature/c
gt checkout feature/a # Bug is here
git add .
gt modify
gt restack # Update b and c
gt submit
Split a Branch¶
# feature/too-big needs splitting
gt checkout feature/too-big
# Create new branch for part of it
gt create feature/part-1
# Move some commits...
gt checkout feature/too-big
# Rename to part-2
gt rename feature/part-2