merge¶
vb merge|cherrypick [OPTIONS] [VERSION ...]
Description¶
The argument VERSION is a version that should be merged into the
current check-out. All changes from VERSION back to the nearest
common ancestor are merged. Except, if either of the --cherrypick
or --backout options are used only the changes associated with the
single check-in VERSION are merged. The --backout option causes
the changes associated with VERSION to be removed from the current
check-out rather than added. When invoked with the name
cherrypick instead of merge, this command works exactly like
--cherrypick.
Files which are renamed in the merged-in branch will be renamed in the current check-out.
If the VERSION argument is omitted, then VisionByte attempts to find a recent fork on the current branch to merge.
Note that this command does not commit the merge, as that is a separate step.
If there are multiple VERSION arguments, then each VERSION is merged (or cherrypicked) in the order that they appear on the command-line.
Options¶
- --backout¶
Do a reverse cherrypick merge against VERSION. In other words, back out the changes that were added by VERSION.
- --baseline BASELINE¶
Use BASELINE as the
pivotof the merge instead of the nearest common ancestor. This allows a sequence of changes in a branch to be merged without having to merge the entire branch.
- --binary GLOBPATTERN¶
Treat files that match GLOBPATTERN as binary and do not try to merge parallel changes. This option overrides the binary-glob setting.
- --cherrypick¶
Do a cherrypick merge VERSION into the current check-out. A cherrypick merge pulls in the changes of the single check-in VERSION, rather than all changes back to the nearest common ancestor.
- -f, --force¶
Force the merge even if it would be a no-op
- --force-missing¶
Force the merge even if there is missing content
- --integrate¶
Merged branch will be closed when committing
- -K, --keep-merge-files¶
On merge conflict, retain the temporary files used for merging, named *-baseline, *-original, and *-merge.
- -n, --dry-run¶
Do not actually change files on disk
- --noundo¶
Do not record changes in the undo log
- -v, --verbose¶
Show additional details of the merge
Examples¶
Init and open a repository
$ vb init merge_repo.vbyte
project-id: 2acf1e63cc1512bb2925464ff9d77ab08261ad99
server-id: aa7c427a023542aa0e045a59f3afb26eb714c0df
admin-user: ubuntu (initial remote-access password is "dWNzVTukEU")
$ vb open -f merge_repo.vbyte
project-name: <unnamed>
repository: /tmp/sphinx_tests/0fe40f1a/merge_repo/merge_repo.vbyte
local-root: /tmp/sphinx_tests/0fe40f1a/merge_repo/
config-db: /tmp/sphinx_tests/0fe40f1a/.visionbyte
project-code: 2acf1e63cc1512bb2925464ff9d77ab08261ad99
checkout: c8197ac5b61a9f0cf9a877fa56f8c05c96011d5e 2026-03-31 13:00:27 UTC
tags: trunk
comment: initial empty check-in (user: ubuntu)
check-ins: 1
Add a file and commit to trunk
$ vb sys echo "base" > main.txt
$ vb add main.txt
ADDED main.txt
$ vb ci -m "trunk work"
Committed version: ae9a14748f81e7d6deca4de7e91e12a813368fc85d37c3c232024e183682e2de
Create a feature branch and commit
$ vb sys echo "feature" >> main.txt
$ vb ci -m "feature change" --branch feature/a
Committed version: df442f09f89a3bfaf1aba0f6ade01464fd15ee3ad44ff76de3fa3fac9ab464f7
Merge feature/a into current branch and commit
$ vb merge feature/a
MERGE main.txt
"vb undo" is available to undo changes to the working checkout.
$ vb ci -m "Merge feature/a"
Committed version: 65dae1c7cdea1fa78e932aac18fc06ed7294f44ae841affe01157701c1185811