Skip to main content
Field reference · included in the free path

Git field toolbox

Essentials within reach.
Reason before commanding.

Diagnose a repository, choose a workflow and act with the right level of caution. Built for real work situations.

5 tools · one context at a time

Open the resource you need now.

Keyboard: Left/Right arrows, Home and End.

Anti-panic protocol

Stop. Inspect. Save a return point. Only then repair.

Git often preserves more exits than expected. Start with readable, reversible actions before deletion or rewriting.

Checklist · 90 seconds

Establish the facts

  1. 01

    Locate yourself

    Confirm repository, branch and affected files. Do not repair anything yet.

    Command
    git rev-parse --show-toplevel
    git status --short --branch
  2. 02

    Name the in-progress operation

    The full status message says whether Git awaits a merge, rebase, cherry-pick or revert.

    Command
    git status
  3. 03

    Refresh without integrating

    Fetch updates your remote view without touching the working branch.

    Command
    git fetch --all --prune
    git branch -vv
  4. 04

    Draw what happened

    The graph shows divergence; the reflog recovers local HEAD movements.

    Command
    git log --oneline --decorate --graph --all -20
    git reflog --date=local -20
  5. 05

    Create a return point

    Before rewriting, name the current commit. A branch copies nothing: it creates a marker.

    Command
    git branch rescue/before-repair
Decision tree

Choose the lowest-risk exit

Starting point

What exactly does git status say?

The answer determines the action family. Do not mix several repairs at once.

Operation in progress

Continue or return to the start

Resolve, stage and continue. If the context is wrong, use the matching abort.

Safe path
git merge --abort
git rebase --abort
git cherry-pick --abort
git revert --abort
Uncommitted work

Shelve before moving

Preserve untracked files too, then verify that the working tree is clean.

Safe path
git stash push -u -m "rescue before diagnosis"
Missing commit

Recreate a marker from the reflog

Find the still-visible hash, inspect it, then create a recovery branch.

Safe path
git reflog
git show <hash>
git switch -c rescue/recovered-commit <hash>
Bad published commit

Add the inverse and keep history

On a shared branch, revert communicates the undo without moving teammates.

Safe path
git revert <hash>
Latest local commit

Undo without losing content

Soft reset places changes back in the index so you can rebuild the commit.

Safe path
git branch rescue/before-reset
git reset --soft HEAD~1
Unclear conflict

Compare both intentions

Open each file, remove markers, test, stage, then continue the operation named by status.

Safe path
git diff --name-only --diff-filter=U
git add <resolved-file>
git status