Syntax
Description
Shows comprehensive status information for all worktrees in the current repository, including:- Uncommitted changes
- Lines added/deleted
- Commits ahead of main
- Commits behind main
- Merge status
Aliases
st- Short alias for status
Output Format
Status Indicators
Ready to Merge (Green)
Shows when a worktree:- Has no uncommitted changes
- Has commits ahead of main
- Is not behind main
In Progress (Yellow)
Shows when a worktree has:- Uncommitted changes
- Or is behind main
Merged (Gray/Dim)
Shows when the branch has been merged to main:Clean (Dim)
Shows when there are no changes or commits:Status Components
Diff Stats
Shows additions and deletions since last commit:- Green
+245- Lines added - Red
-12- Lines deleted
Changed Files
Number of files with uncommitted changes:Commits Ahead
Commits in the worktree branch not in main:Commits Behind
Commits in main not in the worktree branch:Summary Line
The bottom line shows aggregate counts:- Ready to merge - Worktrees with no changes and commits ahead
- In progress - Worktrees with changes or behind main
- Merged - Worktrees whose branches are merged to main
Examples
Check all worktree status
Using the short alias
Example Output Scenarios
New worktree, no changes
Active development
Ready for merge
Behind main
Already merged
When No Worktrees Exist
Use Cases
Daily Standup
Quickly see status of all active work:Before Clean
Verify which worktrees are merged before cleaning:Track Progress
Monitor multiple features in development:After Pull
See if worktrees are behind after pulling main:Technical Details
Status Calculation
For each worktree, the command runs:Main Branch Detection
Automatically detects main branch:- Looks for
mainbranch - Falls back to
masterbranch - Defaults to
mainif neither exists
Performance
The status command runs git operations for each worktree. For repositories with many worktrees, this may take a few seconds.Exit Codes
0- Success (status displayed or no worktrees found)1- Error (not in a git repository)