Skip to main content
Prefer a visual workflow? See Changes in the web UI.

The Staging Workflow

Git-Semantic uses the same two-step workflow as Git: stage changes first, then commit them. This gives you control over exactly what goes into each commit.
  • Working tree: The current state of your context tree files on disk
  • Staging area: A snapshot of changes queued for the next commit
  • Commit history: The permanent record of all committed snapshots

Check Working Tree Status

See what has changed in your context tree since the last commit. This is usually the first command you run to understand the current state.

What Status Shows

The output includes several sections:
Run vc status frequently to stay aware of your working state — especially before committing, merging, or switching branches.

Stage Changes

Add files to the staging area to include them in the next commit. Only staged changes are included when you run vc commit.

Stage All Changes

The . stages everything — all modified, deleted, and new (untracked) files in the context tree.

Stage Specific Files

Default Behavior

When no paths are provided, vc add defaults to staging everything (equivalent to vc add .).
Paths are relative to the context tree root. You can stage individual files, multiple files, or entire directories.

Create a Commit

Save staged changes as a new commit with a descriptive message. Each commit is an immutable snapshot of your context tree at that point in time.

Commit Message

The -m flag is required — every commit needs an explicit message. There is no auto-generated commit message. Write messages that describe what changed and why:

What a Commit Records

Each commit stores:

Requirements

  • Author configured: Both user.name and user.email must be set via vc config
  • Something staged: At least one file must be in the staging area

Error Handling

View Commit History

Browse the commit log to see what has changed over time.

Log Entry Fields

Each entry in the log includes:

Arguments & Flags

Error Handling

Unstage Files

Remove files from the staging area without discarding the actual changes. The files remain modified in your working tree.
This is the equivalent of git reset (without --soft or --hard) — it only affects the staging area, not your working tree.
Use vc reset when you accidentally staged files you didn’t intend to commit. Your changes are preserved — only the staging state is cleared.

Undo Commits

Roll back commits using --soft or --hard reset. Both move HEAD to a previous commit, but they differ in what happens to your changes.

Soft Reset

Moves HEAD back but keeps all changes staged. The changes from the undone commit(s) remain in the staging area, ready to be re-committed.
Use cases:
  • Re-writing a commit message (soft reset, then commit again with a new message)
  • Combining multiple commits into one (soft reset several commits, then commit once)
  • Removing a commit but keeping the work

Hard Reset

Moves HEAD back and discards all changes. Your working tree and staging area are reset to match the target commit.
--hard reset permanently discards changes. There is no way to recover the discarded changes after a hard reset. Make sure you don’t need the changes before running this command.
Use cases:
  • Completely undoing a bad commit
  • Resetting to match the remote state after a failed merge
  • Starting over from a known good state

Comparison

--soft and --hard are mutually exclusive — you cannot use both in the same command.

Error Handling

Common Workflows

Basic Edit-Stage-Commit Cycle

The day-to-day workflow for tracking context changes:

Selective Staging

When you’ve made changes across multiple domains but want separate commits:

Rewriting a Commit Message

If you made a typo or want a better message:

Squashing Multiple Commits

Combine several small commits into one: