Git Recovery and Inspection Workflows

Recoverable Git workflows for finding commits, restoring selected files, and undoing shared changes.

  • JSON5,492 B
  • YAML3,871 B · −30%
  • TOON3,119 B · −43%

Recoverable Git workflows for finding commits, restoring selected files, and undoing shared changes. Each row includes a practical application and a failure to check before using it.

Use it when

  • Recover a commit after a mistaken reset.
  • Undo a published change while preserving history.

Watch out for

  • These commands are examples; inspect your local state first.
  • Git cannot recover untracked content it never recorded.

The data

SituationCommandEffectCheck first
Find a recent branch positiongit reflog show --date=isoList locally recorded ref movements.Reflogs are local and entries can expire.
Preserve a found commitgit branch recovered <commit>Give the commit a durable branch reference.Inspect the commit before switching or merging.
Undo a shared commitgit revert <commit>Create a new commit that reverses a change.Review conflicts and dependent changes.
Restore one working filegit restore --source=<commit> -- pathReplace the selected working-tree path.Copy uncommitted work you need before replacing it.
Unstage a filegit restore --staged -- pathRemove the file from the staged change.It normally leaves the working file intact.
Inspect a commitgit show --stat <commit>Read the change summary.Read the actual diff before relying on the summary.
Inspect one old filegit show <commit>:path/to/filePrint a file from a chosen commit.The path is relative to the repository root.
Save local workgit stash push -u -m 'before repair'Record tracked changes and untracked files.Ignored files require separate preservation.
Preview stale branchesgit branch --mergedList branches merged into the current commit.Merged does not mean the branch is safe to delete.
Verify the destinationgit remote -vShow fetch and push destinations.Confirm the repository before pushing a repair.

Fields

The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.

SectionFieldTypeExample
datasituationstringFind a recent branch position
datacommandstringgit reflog show --date=iso
dataeffectstringList locally recorded ref movements.
datacheck_firststringReflogs are local and entries can expire.

Fetch the same bytes

The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.

curl "https://yjtoon.com/api/dataset/git-recovery-workflows?format=toon"
const res = await fetch(
  "https://yjtoon.com/static-data/dataset/git-recovery-workflows.toon"
);
const toon = await res.text();

Rate limit: 120 requests per minute per IP, no key and no signup. API reference →

Sources and editorial notes

Original editorial reference notes by YJTOON, informed by the linked primary documentation. External specifications retain their own licenses.

Editorial review: . Source documents keep their own licenses.

Topics

  • unix-commands
  • git recovery workflows
  • reference
  • engineering

Search the library

Search by a topic, title, or keyword.

Start with a collection

Browse all 205 datasets