Git Recovery and Inspection Workflows
Recoverable Git workflows for finding commits, restoring selected files, and undoing shared changes.
Recoverable Git workflows for finding commits, restoring selected files, and undoing shared changes.
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.
| Situation | Command | Effect | Check first |
|---|---|---|---|
| Find a recent branch position | git reflog show --date=iso | List locally recorded ref movements. | Reflogs are local and entries can expire. |
| Preserve a found commit | git branch recovered <commit> | Give the commit a durable branch reference. | Inspect the commit before switching or merging. |
| Undo a shared commit | git revert <commit> | Create a new commit that reverses a change. | Review conflicts and dependent changes. |
| Restore one working file | git restore --source=<commit> -- path | Replace the selected working-tree path. | Copy uncommitted work you need before replacing it. |
| Unstage a file | git restore --staged -- path | Remove the file from the staged change. | It normally leaves the working file intact. |
| Inspect a commit | git show --stat <commit> | Read the change summary. | Read the actual diff before relying on the summary. |
| Inspect one old file | git show <commit>:path/to/file | Print a file from a chosen commit. | The path is relative to the repository root. |
| Save local work | git stash push -u -m 'before repair' | Record tracked changes and untracked files. | Ignored files require separate preservation. |
| Preview stale branches | git branch --merged | List branches merged into the current commit. | Merged does not mean the branch is safe to delete. |
| Verify the destination | git remote -v | Show fetch and push destinations. | Confirm the repository before pushing a repair. |
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.
| Section | Field | Type | Example |
|---|---|---|---|
| data | situation | string | Find a recent branch position |
| data | command | string | git reflog show --date=iso |
| data | effect | string | List locally recorded ref movements. |
| data | check_first | string | Reflogs are local and entries can expire. |
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 →
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.