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 pivot of 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

--nosync

Do not auto-sync prior to merging

--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: 2e0e963d27b92a0e24a5760cb5a1a666abb09d6f
server-id:  432a32ab70e7ca5b530f1135ba3ab574d0a9c789
admin-user: ubuntu (initial remote-access password is "HtUoEPDYk6")
$ 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: 2e0e963d27b92a0e24a5760cb5a1a666abb09d6f
checkout:     f17e127de4bd141608593d2878cc812287685c15 2026-04-07 06:51:15 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: f0659c40a44b19eff641fb45d78afb5c519e7a01215bdb3bf11d1f5d1fb105da
  • Create a feature branch and commit

$ vb sys echo "feature" >> main.txt
$ vb ci -m "feature change" --branch feature/a
Committed version: 723ff4833c0ac9a116e93d01e39aeaf555bc4654357290b98c0a07fb7763e435
  • 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: 44ed7f14e5d63453039383ffe82de50541b6b576adf58295ef0a6421f78ff43a