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 backHEAD Back).
  • For interactive exploration, run hug alias in your terminal.

Command Families Overview

PrefixCategoryDescriptionTop Commands
h*HEAD OperationsUndo, rewind, and inspect commits without losing work. Safest for experimenting.hug h back (HEAD Back – soft reset), hug h undo (Undo – mixed reset), hug h steps <file> (Steps – distance to last file change)
w*Working DirectoryManage local changes: discard, clean, restore, or park/unpark temp work. Great for cleanup.hug w discard <file> (Working dir Discard), hug w zap-all (Zap All – full reset), hug wip "<msg>" (Work In Progress – park & switch back), hug wips "<msg>" (Work In Progress Stay – park & stay), hug w unwip (Unpark WIP – integrate WIP branch)
s*StatusView repo state: summaries, diffs, and stashes. Essential for daily checks.hug s (Status snapshot), hug sw (Status + Working diff), hug ssave (Stash Save)
a*Staging/AddStage changes for commit: tracked, all, or interactive. Pairs with s*.hug a <file> (Add tracked), hug aa (Add All), hug ap (Add + Patch – interactive)
b*BranchingCreate, switch, list, delete, and pull branches. Core for feature isolation and sync.hug bc <name> (Branch Create), hug b <name> (Branch switch), hug bpull (Branch Pull – safe ff-only), hug bpullr (Branch Pull Rebase)
c*CommitsCreate and amend commits. Focus on atomic, meaningful snapshots.hug c "<msg>" (Commit), hug caa "<msg>" (Commit All Amend), hug cm "<msg>" (Commit Modify – amend)
l*LoggingSearch and view history: messages, code, authors, files. For debugging timelines.hug l (Log summary), hug lf "<term>" (Log Filter – message search), hug llf <file> (Log Lookup File)
f*File InspectionAnalyze file history: blame, contributors, origin. Ownership and evolution insights.hug fblame <file> (File Blame), hug fcon <file> (File CONtributors), hug fborn <file> (File Born – added date)
t*TaggingManage tags for releases/milestones. Lightweight or annotated.hug tc <tag> (Tag Create lightweight), hug ta <tag> "<msg>" (Tag Annotated), hug t (Tags list)
r*RebaseInteractive history editing: continue, abort, skip. For clean timelines.hug rb <branch> (Rebase onto branch), hug rbi (Rebase Interactive), hug rba (Rebase Abort)
m*MergeIntegrate branches: squash, fast-forward, or keep. Conflict resolution.hug m <branch> (Merge squash), hug mff <branch> (Merge Fast-Forward), hug ma (Merge Abort)

Visual Command Tree

Expand for a tree view of all families
Hug Commands
├── h* (HEAD: Undo & Rewind)
│   ├── h back     # Soft reset (staged)
│   ├── h undo     # Mixed reset (unstaged)
│   ├── h rollback # Hard reset (preserve work)
│   ├── h rewind   # Full hard reset (clean)
│   ├── h files    # Preview affected files
│   └── h steps    # Steps to file change
├── w* (Working Dir: Clean & Restore)
│   ├── w discard  # Discard unstaged/staged
│   ├── w wipe     # Wipe uncommitted
│   ├── w purge    # Purge untracked/ignored
│   ├── w zap      # Wipe + purge (nuclear)
│   ├── w get      # Restore from commit
│   ├── w wip        # Park work & switch back
│   ├── w wips       # Park work & stay on new branch
│   ├── w unwip      # Integrate WIP branch
│   └── w wipdel     # Delete WIP branch
├── s* (Status: View State)
│   ├── s          # Quick summary
│   ├── sl         # List tracked
│   ├── sla        # List all (untracked)
│   ├── ss         # Staged diff
│   ├── su         # Unstaged diff
│   ├── sw         # Working diff (full)
│   └── ssave      # Stash quick
├── a* (Staging: Prepare Commit)
│   ├── a          # Add tracked
│   ├── aa         # Add all
│   ├── ai         # Add interactive
│   └── ap         # Add patch (hunks)
├── b* (Branches: Manage Flow)
│   ├── b          # Switch (interactive)
│   ├── bc         # Create & switch
│   ├── bl         # List local
│   ├── bdel       # Delete safe
│   └── bpush      # Push & upstream
├── c* (Commits: Record Changes)
│   ├── c          # Commit staged
│   ├── caa        # Commit all (tracked + untracked)
│   └── cm         # Amend last
├── l* (Logging: History Search)
│   ├── l          # Oneline log
│   ├── lf         # Filter messages
│   ├── lc         # Code search
│   └── llf        # File history
├── f* (Files: Inspect Authorship)
│   ├── fblame     # Line-by-line blame
│   ├── fcon       # Contributors
│   └── fa         # Author counts
├── t* (Tags: Milestones)
│   ├── t          # List tags
│   ├── tc         # Create lightweight
│   └── ta         # Create annotated
├── r* (Rebase: Edit History)
│   ├── rb         # Rebase onto
│   ├── rbi        # Interactive rebase
│   └── rba        # Abort rebase
└── m* (Merge: Integrate)
    ├── m          # Squash merge
    ├── mff        # Fast-forward only
    └── ma         # Abort merge

Next Steps

  • Pick a family and explore its dedicated page (e.g., HEAD Operations for h*).
  • Practice: Run hug s to check status, then hug b to switch branches.
  • For a quick daily reference, see the Cheat Sheet.
  • For full lists, see individual command docs or hug help in your repo.

This map evolves with Hug - contribute new families via pull requests!

Released under the Apache 2.0 License.