checkout¶
vb checkout|co {VERSION|--latest} [OPTIONS]
Description¶
NOTE: Most people use vb update instead of vb checkout for day-to-day operations. If you are new to VisionByte and trying to learn your way around, it is recommended that you become familiar with the vb update command first.
This command changes the current check-out to the version specified
as an argument. The command aborts if there are edited files in the
current check-out unless the --force option is used. The --keep option
leaves files on disk unchanged, except the manifest and manifest.uuid
files.
The –latest flag can be used in place of VERSION to check-out the latest version in the repository.
Options¶
- -f, --force¶
Ignore edited files in the current check-out
- -k, --keep¶
Only update the manifest file(s)
- --force-missing¶
Force check-out even if content is missing
- --setmtime¶
Set timestamps of all files to match their SCM-side times (the timestamp of the last check-in which modified them)
Examples¶
Init and open a repository
$ vb init checkout_repo.vbyte
project-id: 7286c272aba0ddaa655c03a5e6311fc6a8de5a90
server-id: 9086948df84ca40ad1ed66243a5c2960116f1f15
admin-user: ubuntu (initial remote-access password is "KkX5pYMFe4")
$ vb open -f checkout_repo.vbyte
project-name: <unnamed>
repository: /tmp/sphinx_tests/e6fa3884/checkout_repo/checkout_repo.vbyte
local-root: /tmp/sphinx_tests/e6fa3884/checkout_repo/
config-db: /tmp/sphinx_tests/e6fa3884/.visionbyte
project-code: 7286c272aba0ddaa655c03a5e6311fc6a8de5a90
checkout: ff5537bbae1925257ed181d5e8ffa25fa1c79fa3 2026-04-07 06:51:14 UTC
tags: trunk
comment: initial empty check-in (user: ubuntu)
check-ins: 1
Create two tagged commits
$ vb sys echo "one" > f.txt
$ vb add f.txt
ADDED f.txt
$ vb ci -m "v1" --tag v1
Committed version: e1b152c126f87fd5a5080370d3a4ab1adbff30bda51f4ee675d4bc5bf2e9b070
$ vb sys echo "two" >> f.txt
$ vb ci -m "v2" --tag v2
Committed version: 20dbe11762b8b0b5db1db1aee7341198d67e597d999bc2fc5b7fff7df4c63b1b
Switch between tags
$ vb checkout tag:v1
f.txt
$ vb sys cat f.txt
one
$ vb checkout tag:v2
f.txt
$ vb sys cat f.txt
one
two
See Also¶
See also