revert¶
vb revert [OPTIONS] [FILE ...]
Description¶
Revert to the current repository version of FILE, or to
the baseline VERSION specified with -r flag.
If FILE was part of a rename operation, both the original file and the renamed file are reverted.
Using a directory name for any of the FILE arguments is the same as using every subdirectory and file beneath that directory.
Revert all files if no file name is provided.
If a file is reverted accidentally, it can be restored using the vb undo command.
Options¶
- --noundo¶
Do not record changes in the undo/redo log.
- -r, --revision VERSION¶
Revert given FILE(s) back to given VERSION
Examples¶
Create a file and add it to the repository
$ vb sys echo "This is content befor change" > test.txt
$ vb add test.txt
ADDED test.txt
$ vb ci -m "base"
Committed version: 12403c874152943b89154018dbb7cfdaa742c5948d69b3a88177d8e1e3dc6fdb
Make changes to the file
$ vb changes
EDITED test.txt
Revert the file back to last check-in
$ vb revert test.txt
REVERT test.txt
"vb undo" is available to undo changes to the working checkout.
$ vb sys cat test.txt
This is content befor change