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

--prompt

Prompt before overwriting when --force is used

--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: 6699b0d228b03a87185703d3374a6fefb391d0e4
server-id:  af1c55cf35b38531c20b357ddfc90ab78393a100
admin-user: ubuntu (initial remote-access password is "3EZLxDrwBc")
$ 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: 6699b0d228b03a87185703d3374a6fefb391d0e4
checkout:     5404a50177535401ebf12e01b5287f1369b024cf 2026-03-31 13:00:08 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: a707e068780cdea38818cceb175a505865c1767568bda2ee61e28f8aa3ec532c
$ vb sys echo "two" >> f.txt
$ vb ci -m "v2" --tag v2
Committed version: 21ee535b8a12ce414be3f66592cc3fb8a01992a4c3f02f779f5fbe5a5754659f
  • 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

update