Back to commands

Hosting Operations

Read-only

Show Files Changed Since Last Good Release

A new release is suspect, and you need a quick list of files changed after the last stable release.

Command

cd /lab/git-recovery-rollback && git diff --name-status release-2026-06-25-1000..HEAD

Before you run this

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

When not to use it: Do not use this as proof of root cause; it only narrows the changed surface.

Expected output

A name-status list including app/config.yml, db/migrate.sql, public/index.html, and release metadata.

System impact

Read-only. Nothing changes. Git lists files changed between the previous release tag and HEAD.

Recovery / rollback: no state is changed.

When to use it

Use when deciding whether a rollback is likely to touch code, config, migrations, or release metadata.

When not to use it

Do not use this as proof of root cause; it only narrows the changed surface.

Watch this command run

Command transcript

This sanitized transcript shows the commands and output shape without exposing host details.

demo@lab:~$

$ cd /work/git-recovery-rollback && git diff --stat release-2026-06-25-1000..HEAD

 app/config.yml                   | 4 ++--
 db/migrate.sql                   | 1 +
 public/index.html                | 2 +-
 releases/2026-06-25-1030/VERSION | 2 ++
 4 files changed, 6 insertions(+), 3 deletions(-)

$ cd /work/git-recovery-rollback && git diff --name-status release-2026-06-25-1000..HEAD

M	app/config.yml
A	db/migrate.sql
M	public/index.html
A	releases/2026-06-25-1030/VERSION
View commands shown

These are the commands shown in the sanitized transcript.

Commands shown

  1. cd /lab/git-recovery-rollback && git diff --stat release-2026-06-25-1000..HEAD
  2. cd /lab/git-recovery-rollback && git diff --name-status release-2026-06-25-1000..HEAD

next steps

Related commands

Hosting Operations Read-only

Preview the Patch a Rollback Would Apply

Show the exact file changes before moving the branch back.

cd /lab/git-recovery-rollback && git diff --stat HEAD..release-2026-06-25-1000
Hosting Operations State change

Restore One File From Last Good Release

Recover a config file without rolling back the whole branch.

cd /lab/git-recovery-rollback && git restore --source=release-2026-06-25-1000 -- app/config.yml
Hosting Operations State change

Revert the Suspect Release Commit

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

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

Snapshot Git Status Before Recovery

Before rollback commands, capture the branch and dirty files.

cd /lab/git-recovery-rollback && git status --short --branch
Hosting Operations State change

Branch a Recovered Commit

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

cd /lab/git-recovery-rollback && 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:operations-deployment
  • lfcs:services-logs
  • risk:read-only

Useful for

  • LPIC-1 style command-line practice
  • LFCS style performance tasks
  • Linux+ style troubleshooting review

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