DocsCommand reference
restore
Put the real values back in some files, or undo everything Secret Sleuth did to a repository, hooks included.
Try it
SecretSleuth restore --file appsettings.json
SecretSleuth restore --all --remove-hooks # undo everything
How it works
--fileputs one file back to its committed content and clears its protection.--alldoes that for every protected file, and copies untracked files back from their pre-obfuscation backups.--remove-hooksremoves the Secret Sleuth hooks and puts back any hook they replaced.
Files holding edits of your own are refused rather than overwritten. stage and commit them first, or add --discard-local-edits. The manifest is kept; run a full scan to protect again.
Options
| Flag | Description |
|---|---|
--file <path> | Restore one file (repeatable) |
--all | Every protected file, plus untracked files from backups |
--remove-hooks | Remove the hooks and restore any they replaced |
--discard-local-edits | Restore even when that throws away your edits |
--repo <path> | Repository. Default: current folder |
Check the result
[IronForge Secret Sleuth] Restored src\Billing.Api\appsettings.json to its committed content; no longer protected.
The file shows its real values and appears normally in git status. Run this in every repository before uninstalling the tool.