addremove¶
vb addremove [OPTIONS]
Description¶
Do all necessary add and rm commands to synchronize the repository with the content of the working check-out:
All files in the check-out but not in the repository (that is,
all files displayed using the "extras" command) are added as
if by the "add" command.
All files in the repository but missing from the check-out (that is,
all files that show as MISSING with the "status" command) are
removed as if by the "rm" command.
Note that this command does not commit, as that is a separate step.
Files and directories whose names begin with . are ignored unless
the --dotfiles option is used.
The --ignore option overrides the ignore-glob setting, as do the
--case-sensitive option with the case-sensitive setting and the
--clean option with the clean-glob setting. See the documentation
on the settings command for further information.
The -n|--dry-run option shows what would happen without actually doing
anything.
This command can be used to track third party software.
Options¶
- --case-sensitive BOOL¶
Override the case-sensitive setting
- --dotfiles¶
Include files beginning with a dot (
.)
- --ignore CSG¶
Ignore unmanaged files matching patterns from the Comma Separated Glob (CSG) list
- --clean CSG¶
Also ignore files matching patterns from the Comma Separated Glob (CSG) list
- -n, --dry-run¶
If given, display instead of run actions
Examples¶
Init and open a repository
$ vb init addremove_repo.vbyte
project-id: b943189e31c38a8b47733a81aa0290f27ccd707e
server-id: 5a1a8f0a2107772277f726e844c2db24a8f71368
admin-user: ubuntu (initial remote-access password is "vht6YzdT7s")
$ vb open -f addremove_repo.vbyte
project-name: <unnamed>
repository: /tmp/sphinx_tests/892bdacf/addremove_repo/addremove_repo.vbyte
local-root: /tmp/sphinx_tests/892bdacf/addremove_repo/
config-db: /tmp/sphinx_tests/892bdacf/.visionbyte
project-code: b943189e31c38a8b47733a81aa0290f27ccd707e
checkout: 43b3342c94bb6eac392823bcdab051eb731123eb 2026-04-07 06:51:06 UTC
tags: trunk
comment: initial empty check-in (user: ubuntu)
check-ins: 1
Adds all newly created files in the working directory and removes all files that have been deleted from it (excluding those explicitly configured to be ignored or exempt from add/remove operations).
$ vb sys touch test1.txt
$ vb sys touch test2.txt
$ vb sys touch test3.txt
$ vb sys touch test4.txt
$ vb add *
ADDED test1.txt
ADDED test2.txt
ADDED test3.txt
ADDED test4.txt
$ vb ci -m "Adding all files"
Committed version: 4d5adb497f03851241c5cbab0348f8c79e3443a8d6a8d0cd82546ceaf855ad4d
$ vb sys rm *.txt
$ vb sys mkdir dir1
$ vb sys touch dir1/test5.txt
$ vb sys touch dir1/test6.txt
$ vb sys touch dir1/test7.txt
$ vb addremove
ADDED dir1/test5.txt
ADDED dir1/test6.txt
ADDED dir1/test7.txt
DELETED test1.txt
DELETED test2.txt
DELETED test3.txt
DELETED test4.txt
added 3 files, deleted 4 files
Reverts all previously added or removed files.
$ vb addremove --reset
Un-removed 4 file(s).
Un-added 3 file(s).