redo¶
vb undo|redo [OPTIONS] [FILENAME...]
Description¶
The undo command reverts the changes caused by the previous command if the previous command is one of the following:
* vb update
* vb merge
* vb revert
* vb stash pop
* vb stash apply
* vb stash drop
* vb stash goto
* vb clean (*see note below*)
Note: The vb clean command only saves state for files less than 10MiB in size and so if vb clean deleted files larger than that, then vb undo will not recover the larger files.
If FILENAME is specified then restore the content of the named file(s) but otherwise leave the update or merge or revert in effect. The redo command undoes the effect of the most recent undo.
If the -n|--dry-run option is present, no changes are made and instead
the undo or redo command explains what actions the undo or redo would
have done had the -n|--dry-run been omitted.
If the most recent command is not one of those listed as undoable,
then the undo command might try to restore the state to be what it was
prior to the last undoable command, or it might be a no-op. If in
doubt about what the undo command will do, first run it with the -n
option.
A single level of undo/redo is supported. The undo/redo stack is cleared by the commit and check-out commands. Other commands may or may not clear the undo stack.
Future versions of VisionByte might add new commands to the set of commands that are undoable.
Options¶
- -n, --dry-run¶
Do not make changes, but show what would be done
See Also¶
Examples¶
Init and open a repository
$ vb init undo_repo.vbyte
project-id: efa96abba309d768e0524c453f1f7a6dce6d555e
server-id: b342e224920a893aeec4400f6beb7597749baf0d
admin-user: ubuntu (initial remote-access password is "r2TXgRCUAE")
$ vb open -f undo_repo.vbyte
project-name: <unnamed>
repository: /tmp/sphinx_tests/cb478ae8/undo_repo/undo_repo.vbyte
local-root: /tmp/sphinx_tests/cb478ae8/undo_repo/
config-db: /tmp/sphinx_tests/cb478ae8/.visionbyte
project-code: efa96abba309d768e0524c453f1f7a6dce6d555e
checkout: 6dfa24908b4083b5d05edd0349bceccd1c22e5cd 2026-03-20 03:03:42 UTC
tags: trunk
comment: initial empty check-in (user: ubuntu)
check-ins: 1
Make and revert a change, then undo the revert
$ vb sys echo "a" > t.txt
$ vb add t.txt
ADDED t.txt
$ vb ci -m "base"
Committed version: b020577094807419832a82cc0ab432788f9a2f7ba678e579ee942d0bc2bfed8a
$ vb sys echo "b" >> t.txt
$ vb changes t.txt
EDITED t.txt
$ vb revert t.txt
REVERT t.txt
"vb undo" is available to undo changes to the working checkout.
$ vb changes t.txt --unchanged
t.txt
$ vb undo
UNDO t.txt
$ vb changes t.txt
EDITED t.txt