Back to commands

Hosting Operations

Read-only

Snapshot Git Status Before Recovery

An incident starts with an unknown working tree, and you need to see whether local edits could be overwritten by recovery work.

Command

git status --short --branch

Before you run this

System impact: Read-only. Low when scoped to the shown target.

When not to use it: Do not treat status alone as a release audit; inspect the commit history and deployment pointer too.

Expected output

A short branch line for main and a modified app/config.yml entry.

System impact

Read-only. Nothing changes. Git prints the current branch and working-tree state.

Recovery / rollback: no state is changed.

When to use it

Use before reset, restore, checkout, revert, or rollback work so local edits are visible.

When not to use it

Do not treat status alone as a release audit; inspect the commit history and deployment pointer too.

next steps

Related commands

Hosting Operations Read-only

Revert the Suspect Release Commit

Undo a bad release with a new commit instead of rewriting history.

git restore -- app/config.yml && git revert --no-edit release-2026-06-25-1030
Hosting Operations Read-only

Branch a Recovered Commit

Put a name on the reflog commit before it slips away.

git branch recovered-incident-note HEAD@{1}
Study mapping

Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.

  • LFCS style performance-task practice

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.