rename

vb mv|rename OLDNAME NEWNAME
vb mv|rename OLDNAME ... DIR

Description

Move or rename one or more files or directories within the repository tree. You can either rename a file or directory or move it to another subdirectory.

The mv command does NOT normally rename or move the files on disk. This command merely records the fact that file names have changed so that appropriate notations can be made at the next commit. However, the default behavior of this command may be overridden via command line options listed below and/or the mv-rm-files setting.

The rename command never renames or moves files on disk, even when the command line options and/or the mv-rm-files setting would otherwise require it to do so.

WARNING: If the --hard option is specified -OR- the mv-rm-files setting is non-zero, files WILL BE renamed or moved on disk as well. This does NOT apply to the rename command.

Options

--soft

Skip moving files within the check-out. This supersedes the --hard option.

--hard

Move files within the check-out

--case-sensitive BOOL

Override the case-sensitive setting

-n, --dry-run

If given, display instead of run actions

Examples

  • Init and open a repository

$ vb init mv_repo.vbyte
project-id: a89f0303709c4c165fb71ce7dbc6f9ab26c09bb7
server-id:  400bc7d427d0d9cdc5f5243396c2d124f69932de
admin-user: ubuntu (initial remote-access password is "Ug2kLZHtrw")
$ vb open -f mv_repo.vbyte
project-name: <unnamed>
repository:   /tmp/sphinx_tests/912f7b79/mv_repo/mv_repo.vbyte
local-root:   /tmp/sphinx_tests/912f7b79/mv_repo/
config-db:    /tmp/sphinx_tests/912f7b79/.visionbyte
project-code: a89f0303709c4c165fb71ce7dbc6f9ab26c09bb7
checkout:     9557e745a1d99eb75c6a8ac60ed167df45e1c815 2026-03-31 13:00:35 UTC
tags:         trunk
comment:      initial empty check-in (user: ubuntu)
check-ins:    1
  • Create and commit a file

$ vb sys echo "data" > oldname.txt
$ vb add oldname.txt
ADDED  oldname.txt
$ vb ci -m "Initial"
Committed version: 207e62112fa5b9f8df2f9b2a4d89b5123fe4f3b2c7765d78b38e1002470d9724
  • Rename the file(default not renames or moves files on disk)

$ vb sys mv oldname.txt newname.txt
$ vb mv oldname.txt newname.txt
RENAME oldname.txt newname.txt
$ vb changes
RENAMED    oldname.txt  ->  newname.txt

See Also

See also

changes, status