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.

-v, --verbose

Output information about each --reset file (only with –reset)

-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: 3e1ad59235622f7804b66876b2e16233303d56fa
server-id:  7496a603133b199f55fe5487137a7129d38dbb83
admin-user: ubuntu (initial remote-access password is "VdPctWTgju")
$ 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: 3e1ad59235622f7804b66876b2e16233303d56fa
checkout:     e8c648c31cbb32d290380b63601dc92ddf5d5a61 2026-03-26 08:37:14 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).

See Also

See also

addremove, rm