update¶
vb update [OPTIONS] [VERSION] [FILES ...]
Description¶
Change the version of the current check-out to VERSION. Any uncommitted changes are retained and applied to the new check-out.
The VERSION argument can be a specific version or tag or branch
name. If the VERSION argument is omitted, then the leaf of the
subtree that begins at the current version is used, if there is
only a single leaf. VERSION can also be current to select the
leaf of the current version or latest to select the most recent
check-in.
If one or more FILES are listed after the VERSION then only the named files are candidates to be updated, and any updates to them will be treated as edits to the current version. Using a directory name for one of the FILES arguments is the same as using every subdirectory and file beneath that directory.
If FILES is omitted, all files in the current check-out are subject to being updated and the version of the current check-out is changed to VERSION. Any uncommitted changes are retained and applied to the new check-out.
The -n or --dry-run option causes this command to do a dry run.
It prints out what would have happened but does not actually make
any changes to the current check-out or the repository.
The -v or --verbose option prints status information about
unchanged files in addition to those file that actually do change.
Options¶
- --case-sensitive BOOL¶
Override case-sensitive setting
- --debug¶
Print debug information on stdout
- -n, --dry-run¶
If given, display instead of run actions
- --force-missing¶
Force update if missing content after sync
- -K, --keep-merge-files¶
On merge conflict, retain the temporary files used for merging, named *-baseline, *-original, and *-merge.
- --latest¶
Acceptable in place of VERSION, update to latest version
- --proxy PROXY¶
Use PROXY as http proxy during sync operation
- --setmtime¶
Set timestamps of all files to match their SCM-side times (the timestamp of the last check-in which modified them).
- -v, --verbose¶
Print status information about all files
- -W, --width WIDTH¶
Width of lines (default is to auto-detect). Must be more than 20 or 0 (= no limit, resulting in a single line per entry).
Examples¶
Init and open a repository
$ vb init update_repo.vbyte
project-id: 2770637a8311aeba23af61de17d04f12857fe3b0
server-id: 1880614b5316e73820036ef258f9d742661f6ebc
admin-user: ubuntu (initial remote-access password is "Jn6hUPEYTF")
$ vb open -f update_repo.vbyte
project-name: <unnamed>
repository: /tmp/sphinx_tests/642c0690/update_repo/update_repo.vbyte
local-root: /tmp/sphinx_tests/642c0690/update_repo/
config-db: /tmp/sphinx_tests/642c0690/.visionbyte
project-code: 2770637a8311aeba23af61de17d04f12857fe3b0
checkout: 8a2d3297a448fe3c618fbefc0509830e68144121 2026-04-07 06:51:47 UTC
tags: trunk
comment: initial empty check-in (user: ubuntu)
check-ins: 1
Create two branches with commits
$ vb sys echo "x" > f.txt
$ vb add f.txt
ADDED f.txt
$ vb commit -m "on feature/x" --branch feature/x
Committed version: 030cd8abb33a4917d0dfe7e848ba157a37fe1911805c94a4f901354603416eff
$ vb sys echo "y" >> f.txt
$ vb commit -m "on feature/y" --branch feature/y
Committed version: 52f728db294ce63c1b3dc05c8cfd0c979ab1ebaa6e5f2c324623e90604824eb4
Switch working directory to branches
$ vb update feature/x
UPDATE f.txt
-------------------------------------------------------------------------------
updated-from: 52f728db294ce63c1b3dc05c8cfd0c979ab1ebaa 2026-04-07 06:51:47 UTC
updated-to: 030cd8abb33a4917d0dfe7e848ba157a37fe1911 2026-04-07 06:51:47 UTC
tags: feature/x
comment: on feature/x (user: ubuntu)
changes: 1 file modified.
"vb undo" is available to undo changes to the working checkout.
$ vb update feature/y
UPDATE f.txt
-------------------------------------------------------------------------------
updated-from: 030cd8abb33a4917d0dfe7e848ba157a37fe1911 2026-04-07 06:51:47 UTC
updated-to: 52f728db294ce63c1b3dc05c8cfd0c979ab1ebaa 2026-04-07 06:51:47 UTC
tags: feature/y
comment: on feature/y (user: ubuntu)
changes: 1 file modified.
"vb undo" is available to undo changes to the working checkout.
See Also¶
See also