Skip to content

Command Family Map ​

This map provides a high-level overview of Hug's command families, grouped by prefix. Each family focuses on a specific aspect of version control, making it easy to remember and discover commands. Use this as a mental model: prefixes indicate the operation type, and suffixes add specificity.

How to Use This Map

  • Prefixes (e.g., h*) group related commands.
  • Top Commands show the most common ones; see individual pages for full details.
  • Memory Hook: Bold letters highlight the key initials (e.g., hug h back → HEAD Back).
  • For interactive exploration, run hug help in your terminal.

Command Families Overview ​

This table is the authoritative source for Hug's command organization. All commands are verified against actual implementation in git-config/bin/ and git-config/.gitconfig.

PrefixCategoryDescriptionTop CommandsMemory Hook
h*HEAD OperationsUndo, rewind, and inspect commits without losing workhug h back, hug h undo, hug h files, hug h stepsHEAD
w*Working DirectoryManage local changes: discard, clean, restore, park/unpark workhug w get, hug w wip, hug w zap, hug w purgeWorking dir
wt*Worktree ManagementCreate, switch, list, remove worktrees for parallel developmenthug wt, hug wtc, hug wtl, hug wtll, hug wtdelWTorktree
s*Status & StagingView repo state: summaries, diffs, staged/unstaged changeshug ss, hug su, hug sw, hug sxStatus
a*StagingStage changes for commit: tracked, all, or interactivehug a, hug aa, hug ai, hug apAdd/stage
b*BranchingCreate, switch, list, delete, sync brancheshug b, hug bc, hug bl, hug brBranch
c*CommitsCreate and amend commitshug c, hug ca, hug cm, hug caaCommit
l*Logging & HistorySearch and view history: messages, code, authors, fileshug l, hug lc, hug lf, hug luLog
f*File InspectionAnalyze file history: blame, contributors, originhug fa, hug fb, hug fcon, hug fbornFile
t*TaggingManage tags for releases and milestoneshug t, hug tc, hug ta, hug tsTag
r*RebaseInteractive history editing and rebasinghug rb, hug rbi, hug rbc, hug rbaRebase
m*MergeIntegrate branches with various strategieshug m, hug ma, hug mff, hug mkeepMerge
analyze*Advanced AnalysisAdvanced repository analysis and insightshug analyze deps, hug analyze expert, hug analyze activity, hug analyze co-changesANALYZE
stats*Repository StatisticsQuick repository statistics and metricshug stats file, hug stats author, hug stats branchSTATS

Visual Command Tree ​

Expand for a tree view of all families
Hug Commands
├── h* (HEAD: Undo & Rewind)
│   ├── h back         # HEAD goes back, keeping changes staged
│   ├── h undo         # HEAD goes back, keeping changes unstaged
│   ├── h rollback     # HEAD goes back, discarding changes but preserving uncommitted work
│   ├── h rewind       # HEAD goes back, discarding ALL changes
│   ├── h squash       # Squash commits
│   ├── h files        # Preview affected files if HEAD moved back
│   └── h steps <file> # Count steps back to reach most recent file change
├── w* (Working Dir: Clean & Restore)
│   ├── w discard      # Discard unstaged/staged changes
│   ├── w discard-all  # Discard across entire repo
│   ├── w wipe <path>  # Discard uncommitted (unstaged + staged)
│   ├── w wipe-all     # Wipe all tracked files
│   ├── w purge <path> # Remove untracked/ignored
│   ├── w purge-all    # Remove all untracked/ignored
│   ├── w zap <path>   # Full cleanup (wipe + purge)
│   ├── w zap-all      # Complete repo cleanup
│   ├── w get          # Restore from commit
│   ├── w wip          # Park work on separate WIP branch
│   ├── w wips         # Park work & stay on new WIP branch
│   ├── w unwip        # Integrate WIP branch into current
│   └── w wipdel       # Delete WIP branch
├── wt* (Worktrees: Parallel Development)
│   ├── wt             # Interactive worktree management
│   ├── wtc <branch>   # Create worktree for branch
│   ├── wtl            # List worktrees (short format)
│   ├── wtll           # List worktrees (long format with details)
│   └── wtdel [path]   # Remove worktree safely
├── s* (Status: View State)
│   ├── s            # Quick status
│   ├── sl           # Status + List tracked
│   ├── sla          # Status + List all (untracked)
│   ├── sli          # Status + List inc. ignored
│   ├── ss           # Status + Staged diff
│   ├── su           # Status + Unstaged diff
│   ├── sw           # Status + Working dir diff (both unstaged and staged)
│   └── sx           # eXtended summary
├── a* (Staging: Prepare Commit)
│   ├── a            # Add tracked
│   ├── aa           # Add all
│   ├── ai           # Add interactive
│   ├── ap           # Add patch (hunks)
│   ├── us           # UnStage
│   ├── usa          # UnStage All
│   └── untrack      # Stop tracking
├── b* (Branches: Manage Flow)
│   ├── b            # Switch (interactive menu)
│   ├── br           # Branch switch remote (alias for b -r)
│   ├── brr          # Branch switch remote refreshed (alias for b -R)
│   ├── bcp          # Branch Copy (alias: bc --no-switch --point-to)
│   ├── bc           # Create & switch
│   ├── bl           # Branch List local
│   ├── bla          # Branch List All
│   ├── blr          # Branch List Remote
│   ├── bll          # Branch List Long (detailed)
│   ├── bmv          # Branch Rename (alias for branch -m)
│   ├── bdel         # Branch Delete safe
│   ├── bdelf        # Branch Delete force
│   ├── bdelr        # Branch Delete remote
│   ├── bpull        # Branch Pull (ff-only)
│   ├── bpullr       # Branch Pull with rebase
│   ├── bpush        # Branch Push & upstream
│   ├── bpushf       # Branch Safe force push
│   ├── bwc          # Branch Which Contain
│   ├── bwp          # Branch Which Point
│   ├── bwnc         # Branch Which not contain
│   ├── bwm          # Branch Which merged
│   └── bwnm         # Branch Which not merged
├── c* (Commits: Record Changes)
│   ├── c            # Commit staged
│   ├── ca           # Commit All tracked
│   ├── caa          # Commit Add All (tracked+untracked)
│   ├── cm           # Commit Modify last (staged)
│   ├── cma          # Commit Modify last (all tracked)
│   ├── ccp          # Commit Copy (cherry-pick)
│   ├── cii          # Commit Interactive (patch)
│   ├── cim          # Commit Interactive Menu
│   └── cmv          # Commit Move to branch
├── l* (Logging: History Search)
│   ├── l            # Oneline log
│   ├── la           # Oneline log (all branches)
│   ├── ll           # Log Long (detailed)
│   ├── lla          # Log Long (all branches)
│   ├── lp           # Log with Patches
│   ├── lo           # Log Outgoing (quiet)
│   ├── lol          # Log Outgoing (Long)
│   ├── lf           # Log: Filter messages
│   ├── lc           # Log: Code search
│   ├── lcr          # Log: Code search (Regex)
│   ├── lau          # Log find by author
│   ├── ld           # Log find by date
│   ├── llf          # Log File history
│   ├── llfs         # Log File history (+Stats)
│   └── llfp         # Log File history (+Patch)
├── f* (Files: Inspect Authorship)
│   ├── fblame       # Line-by-line blame
│   ├── fb           # Blame (porcelain)
│   ├── fcon         # Contributors
│   ├── fa           # Author counts
│   └── fborn        # File origin
├── t* (Tags: Milestones)
│   ├── t            # List tags
│   ├── tc           # Create lightweight
│   ├── ta           # Create annotated
│   ├── ts           # Show tag details
│   ├── tr           # Rename tag
│   ├── tm           # Move tag
│   ├── tma          # Move & re-annotate
│   ├── tpush        # Push tag(s)
│   ├── tpull        # Pull tags
│   ├── tpullf       # Pull tags (force)
│   ├── tdel         # Delete local tag
│   ├── tdelr        # Delete remote tag
│   ├── tco          # Checkout tag
│   ├── twc          # Tags which contain
│   └── twp          # Tags which point
├── r* (Rebase: Edit History)
│   ├── rb           # Rebase onto
│   ├── rbi          # Interactive rebase
│   ├── rbc          # Rebase continue
│   ├── rba          # Rebase abort
│   └── rbs          # Rebase skip
├── m* (Merge: Integrate)
│   ├── m            # Squash merge
│   ├── mkeep        # Merge (keep commit)
│   ├── mff          # Fast-forward only
│   └── ma           # Merge abort
├── analyze* (Advanced Analysis)
│   ├── analyze co-changes  # Find files that change together
│   ├── analyze activity    # Temporal commit patterns
│   ├── analyze deps        # Commit dependency graph
│   └── analyze expert      # Code ownership and expertise
└── stats* (Repository Statistics)
    ├── stats file      # File-level statistics
    ├── stats author    # Author contributions
    └── stats branch    # Branch statistics

Next Steps ​

  • New to Hug? Check the Getting Started guide
  • Daily workflows → See the Cheat Sheet for scenario-based commands
  • Deep learning → Pick a family above and explore command details
  • Interactive help → Run hug help in your terminal to discover commands

Maintenance Note: This map is the authoritative source for command organization. When adding new commands:

  1. Update the authoritative table above
  2. Add to the visual command tree
  3. Update README.md brief summary (if new prefix family)
  4. Add to cheat-sheet.md if commonly used

Released under the Apache 2.0 License.