SecretSleuth Talk to IronTech

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

  • --file puts one file back to its committed content and clears its protection.
  • --all does that for every protected file, and copies untracked files back from their pre-obfuscation backups.
  • --remove-hooks removes 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

FlagDescription
--file <path>Restore one file (repeatable)
--allEvery protected file, plus untracked files from backups
--remove-hooksRemove the hooks and restore any they replaced
--discard-local-editsRestore 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.