Hosting Operations
Read-onlyRevert the Suspect Release Commit
The suspect release has already been shared, and you need a rollback commit that preserves branch history.
Command
git restore -- app/config.yml && git revert --no-edit release-2026-06-25-1030
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not use revert blindly when the bad release included database migrations or external side effects that need a separate rollback plan.
Expected output
Git restores the dirty file, creates a revert commit, and the recent log shows the new Revert commit above the suspect release.
System impact
Read-only. The dirty config line is discarded, then a new local revert commit is created inside the local repositorysitory.
When to use it
Use when a bad commit is already published or shared and rollback should be represented as a forward-moving commit.
When not to use it
Do not use revert blindly when the bad release included database migrations or external side effects that need a separate rollback plan.
Recovery / rollback
Reset the disposable example branch back one commit or recreate the example.
next steps
Related commands
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
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"
Create a SHA256 Checksum Manifest
A file list says what exists; checksums say whether bytes match.
sha256sum source/app/config.yml source/content/index.md source/content/about.md source/assets/logo.svg
Snapshot Git Status Before Recovery
Before rollback commands, capture the branch and dirty files.
git status --short --branch
Map Recent Release Commits
A rollback is easier when the last few release tags are visible.
git log --oneline --decorate --graph --all -8
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.