Hosting Operations
Read-onlyShow 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
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.
next steps
Related commands
Preview the Patch a Rollback Would Apply
Show the exact file changes before moving the branch back.
git diff --stat HEAD..release-2026-06-25-1000
Restore One File From Last Good Release
Recover a config file without rolling back the whole branch.
git restore --source=release-2026-06-25-1000 -- app/config.yml
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
Diff Restored Config Against Expected
A restored config can exist and still be the wrong config.
BACKUP_ROOT=/srv/backups/site EXPECTED_CONFIG=/srv/backups/site/expected/app/config.yml RESTORE_SANDBOX=/tmp/linuxoneliners-restore/full && rm -rf "$RESTORE_SANDBOX" && mkdir -p "$RESTORE_SANDBOX" && tar -xf "$BACKUP_ROOT/2026-06-25/site.tar" -C "$RESTORE_SANDBOX" && diff -u "$EXPECTED_CONFIG" "$RESTORE_SANDBOX/app/config.yml"
Snapshot Git Status Before Recovery
Before rollback commands, capture the branch and dirty files.
git status --short --branch
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.
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.