add¶
vb add [OPTIONS] FILE1 [FILE2 ...]
Description¶
Make arrangements to add one or more files or directories to the current check-out at the next commit.
When adding files or directories recursively, filenames that begin
with . are excluded by default. To include such files, add
the --dotfiles option to the command line.
The --ignore and --clean options are comma-separated lists of glob patterns
for files to be excluded. Example: *.o,*.obj,*.exe. If the --ignore
option does not appear on the command line then the ignore-glob setting
is used. If the --clean option does not appear on the command line then
the clean-glob setting is used.
When attempting to explicitly add files on the command line, and if those
match ignore-glob, a confirmation is asked first. This can be prevented
using the -f|--force option.
The --case-sensitive option determines whether filenames should
be treated case sensitive or not. If the option is not given, the default
depends on the global setting, or the operating system default, if not set.
Options¶
- --case-sensitive BOOL¶
Override the case-sensitive setting
- --dotfiles¶
Include files beginning with a dot (
.)
- -f, --force¶
Add files without prompting
- --ignore CSG¶
Ignore unmanaged files matching patterns from the Comma Separated Glob (CSG) pattern list
- --clean CSG¶
Also ignore files matching patterns from the Comma Separated Glob (CSG) list
- --reset¶
Reset the ADDED state of a check-out, such that all newly added (but not yet committed) files are no longer added. No flags other than –verbose and –dry-run may be used with –reset.
- --allow-reserved¶
Permit filenames which are reserved on Windows platforms. Such files cannot be checked out on Windows, so use with care.
- -n, --dry-run¶
Display actions instead of running them (only with –reset)
Examples¶
Init and open a repository
$ vb init add_repo.vbyte
project-id: 515e1d8730fc8c0add6ce3784b3b5ec4d4f3fe77
server-id: 6c90bf787de16e6877242ad9a0ce61bfc0d5b340
admin-user: ubuntu (initial remote-access password is "t6KRom4NWu")
$ vb open -f add_repo.vbyte
project-name: <unnamed>
repository: /tmp/sphinx_tests/90387e51/add_repo/add_repo.vbyte
local-root: /tmp/sphinx_tests/90387e51/add_repo/
config-db: /tmp/sphinx_tests/90387e51/.visionbyte
project-code: 515e1d8730fc8c0add6ce3784b3b5ec4d4f3fe77
checkout: c689e5790a7ac28b81feea3f8acf00cbd5cdb089 2026-03-31 12:59:58 UTC
tags: trunk
comment: initial empty check-in (user: ubuntu)
check-ins: 1
Add a file
$ vb sys touch test1.txt
$ vb add test1.txt
ADDED test1.txt
Add a directory
$ vb sys mkdir dir1
$ vb sys touch dir1/test2.txt
$ vb sys touch dir1/test3.txt
$ vb add dir1
ADDED dir1/test2.txt
ADDED dir1/test3.txt
Add files beginning with a dot (“.”)
$ vb sys mkdir .dotdir
$ vb sys touch .dotdir/.dotfile1
$ vb sys touch .dotdir/.dotfile2
$ vb sys touch .dotdir/.dotfile3
$ vb add .dotdir --dotfiles
ADDED .dotdir/.dotfile1
ADDED .dotdir/.dotfile2
ADDED .dotdir/.dotfile3
Show the status of the repository
$ vb changes
ADDED .dotdir/.dotfile1
ADDED .dotdir/.dotfile2
ADDED .dotdir/.dotfile3
ADDED dir1/test2.txt
ADDED dir1/test3.txt
ADDED test1.txt
Reset added files
$ vb add --reset --verbose
Un-added: ./.dotdir/.dotfile1
Un-added: ./.dotdir/.dotfile2
Un-added: ./.dotdir/.dotfile3
Un-added: ./dir1/test2.txt
Un-added: ./dir1/test3.txt
Un-added: ./test1.txt
Un-added 6 file(s).