_ _ _ __ _ __| | ___ ___| |__
| | | | '_ \| '_ \ / _ \ / __| '_ \
| |_| | | | | |_| | | (_) |_\__ \ | | |
\__,_|_| |_| __/|_|\___/(_)___/_| |_|
|_|
user@undo.sh:~$
█
__ _ _ _
/ _` | |__ ___ _ _| |_
| (_| | '_ \ / _ \| | | | __|
\__,_|_.__/ \___/ \_,_|\__|
undo.sh is a command, a philosophy, and a "second chance" rendered as a shell script.
It rewinds your last action --steps=1, --depth=infinite, with no questions asked. No stack trace. No regrets.
--maintainer root@undo.sh
--license "MIT (with regret clause)"
--version "1.0.0-stable"
user@undo.sh:~$
█
___ _ __ ___ _ __ ___ _ __ ___ __ _ _ __ __| |___
/ __| '_ ` _ \| '_ ` _ \| '_ ` _ \ / _` | '_ \ / _` / __|
| (__| | | | | | | | | | | | | | | | (_| | | | | (_| \__ \
\___|_| |_| |_|_| |_| |_|_| |_| |_|\__,_|_| |_|\__,_|___/
- $ undo --last
- $ undo --steps "3"
- $ undo --commit HEAD~1
- $ redo --force
- $ undo --life
install.sh 92%
undo 100%
redo 78%
user@undo.sh:~$
█
UNDO(1) UNDO(1)
NAME
undo — reverse the last operation, gracefully.
SYNOPSIS
undo [--steps N] [--commit REF] [--force]
[--dry-run] [--verbose]
DESCRIPTION
undo is a small, opinionated tool that rewinds the last
N operations on the current working tree. It is designed
to be safe by default and noisy on demand.
OPTIONS
--steps N go back N steps. defaults to "1".
--commit REF rewind a specific commit reference.
--force skip confirmation prompts. handle with care.
--dry-run preview the operation without applying it.
--verbose print every action to stdout.
EXIT STATUS
0 success
1 nothing to undo
2 conflict in working tree
42 philosophical impossibility
SEE ALSO
redo(1), commit(1), regret(7)
user@undo.sh:~$
█
_ _
___| |__ __ _ _ __ __ _ ___| | ___ __ _
/ __| '_ \ / _` | '_ \ / _` |/ _ \ |/ _ \ / _` |
| (__| | | | (_| | | | | (_| | __/ | (_) | (_| |
\___|_| |_|\__,_|_| |_|\__, |\___|_|\___/ \__, |
|___/ |___/
- v1.0.0 first stable release. ctrl-z, but with confidence.
- v0.9.4 fix: "undo --life" now panics with dignity.
- v0.9.0 add: --dry-run and pretty diff output.
- v0.8.2 fix: typo in error code 42.
- v0.7.0 add: tmux-style split panes for verbose mode.
- v0.5.1 add: redo, eventually.
- v0.1.0 initial commit. it does not, in fact, undo.
user@undo.sh:~$
█
$ echo "oops" > report.txt
$ rm important_data.csv
!! removed -- 8.4 MB
$ undo --last
[ok] restored important_data.csv — sha a3f1e9c
$ undo --steps "2" --dry-run
~ would revert: report.txt
~ would revert: .bash_history#42
$ redo --force
[ok] redo complete in 12ms
user@undo.sh:~$
█
___ ___ _ __ | |_ __ _ ___| |_
/ __/ _ \| '_ \| __/ _` |/ __| __|
| (_| (_) | | | | || (_| | (__| |_
\___\___/|_| |_|\__\__,_|\___|\__|
user@undo.sh:~$
█