cherrypick¶
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: 8b0483694472524a2ac6840afbced5ad54aa72b8
server-id: 7135e48b947aedaead27f13c2e25df4b7d4b16f8
admin-user: ubuntu (initial remote-access password is "de4AbiQuVo")
$ vb open -f merge_repo.vbyte
project-name: <unnamed>
repository: /tmp/sphinx_tests/68aa77a1/merge_repo/merge_repo.vbyte
local-root: /tmp/sphinx_tests/68aa77a1/merge_repo/
config-db: /tmp/sphinx_tests/68aa77a1/.visionbyte
project-code: 8b0483694472524a2ac6840afbced5ad54aa72b8
checkout: 2c4d6456f97eb6da91b1710c27c728f2eef7e054 2026-03-31 13:00:09 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: a9bfa1ad6ab4dcff18bad7d28749bc70f03f09d68d23ca28de3a52c1a16ad10b
Create a feature branch and commit
$ vb sys echo "feature" >> main.txt
$ vb ci -m "feature change" --branch feature/a
Committed version: a181431d1bbbb4b5c9cb7dac7ad28af61ce8a4ab6af46a9f34bb79b6bbf6013a
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: 44377203b8fed639ccd065a860f657650364f90f7765f95d949ae25ce72cb062