touch

vb touch [OPTIONS] [FILENAME ...]

Description

For each file in the current check-out matching one of the provided list of glob patterns and/or file names, the file’s mtime is updated to a value specified by one of the flags --checkout, --checkin, or --now.

If neither glob patterns nor filenames are provided, it operates on all files managed by the currently checked-out version.

This command gets its name from the conventional Unix touch command.

Only one of --now, --checkin, and --checkout may be used. The default is --now.

Only one of -g or -G may be used. If neither is provided and no additional filenames are provided, the effect is as if a glob of * were provided, i.e. all files belonging to the currently checked-out version. Note that all glob patterns provided via these flags are always evaluated as if they are relative to the top of the source tree, not the current working (sub)directory. Filenames provided without these flags, on the other hand, are treated as relative to the current directory.

As a special case, files currently undergoing an uncommitted merge might not get timestamped with --checkin because it may be impossible for vb to choose between multiple potential timestamps. A non-fatal warning is emitted for such cases.

Options

--now

Stamp each affected file with the current time. This is the default behavior.

-c, --checkin

Stamp each affected file with the time of the most recent check-in which modified that file

-C, --checkout

Stamp each affected file with the time of the currently checked-out version

-g GLOBLIST

Comma-separated list of glob patterns

-G GLOBFILE

Similar to -g but reads its globs from a vb-conventional glob list file

-v, --verbose

Outputs extra information about its globs and each file it touches

-n, --dry-run

Outputs which files would require touching, but does not touch them

-q, --quiet

Suppress warnings, e.g. when skipping unmanaged or out-of-tree files

Examples

  • Init and open a repository

$ vb init touch_repo.vbyte
project-id: 2feef88dad9c603b6ee6930585ec43ac73652462
server-id:  07a665aca1965d0033273a99726e3cf8afd93167
admin-user: ubuntu (initial remote-access password is "eyBzhPAkF5")
$ vb open -f touch_repo.vbyte
project-name: <unnamed>
repository:   /tmp/sphinx_tests/463ff42d/touch_repo/touch_repo.vbyte
local-root:   /tmp/sphinx_tests/463ff42d/touch_repo/
config-db:    /tmp/sphinx_tests/463ff42d/.visionbyte
project-code: 2feef88dad9c603b6ee6930585ec43ac73652462
checkout:     4cb094bf37815edb2a326a721a241b602b5b0d18 2026-03-31 13:00:46 UTC
tags:         trunk
comment:      initial empty check-in (user: ubuntu)
check-ins:    1
  • Create and commit tracked files

$ vb sys echo "alpha" > alpha.txt
$ vb sys echo "beta" > beta.txt
$ vb sys echo "notes" > notes.md
$ vb add alpha.txt beta.txt notes.md
ADDED  alpha.txt
ADDED  beta.txt
ADDED  notes.md
$ vb ci -m "base"
Committed version: 16eae455851bb197ed6eb1cdda6101fa6403a01265440a6194698db6b7339c9d
  • Touch only tracked .txt files matched by the glob

$ vb touch -g "*.txt" --verbose
Timestamp = current system time.
glob: *.txt
Touched 0 file(s)