Quick Start¶
Get up and running with Stack in 5 minutes.
1. Initialize Stack¶
Navigate to your Git repository and initialize Stack:
Stack will detect your trunk branch (usually main or master) and remote.
2. Authenticate¶
Connect Stack to your Git provider:
3. Create a Branch¶
Create your first tracked branch:
This creates a new branch on top of your current branch and tracks it in the stack.
4. Make Changes¶
Work normally with Git:
Or use Stack's modify command to amend:
5. View Your Stack¶
See the current stack structure:
Output:
6. Submit PRs¶
When you're ready, submit your stack as pull requests:
Stack creates PRs with proper base branches and descriptions.
7. Keep in Sync¶
After changes are merged upstream:
Stack fetches updates and rebases your branches automatically.
Common Workflow¶
Here's a typical workflow:
# Start from main
gt checkout main
gt sync
# Create a stack of features
gt create feature/step-1
# ... work, commit ...
gt create feature/step-2
# ... work, commit ...
gt create feature/step-3
# ... work, commit ...
# Submit all PRs
gt submit
# After step-1 is merged
gt sync # Rebases step-2 and step-3 onto main
Next Steps¶
- First Stack - Detailed tutorial on creating stacks
- Commands - Full command reference
- Workflows - Common workflow patterns