but pick
Cherry-pick commits into an applied branch.
Each source commit is copied to the target location as a new commit.
If there are no branches applied, a new branch is created for the picked commits. If there is
only one stack of branches applied, the commits are placed at the tip of that stack. Otherwise,
the targeting flags --above, --below, and --branch control where the commits are placed.
Only one targeting flag can be provided at a time.
For more details about CLI IDs, see but help cli-ids.
Usage: but pick <SOURCES> [OPTIONS]
Arguments
<SOURCES>— The sources to cherry-pick (required)
Options
-b,--branch<BRANCH>— Place the picked commits on the branch BRANCH.
If BRANCH does not exist, it is created as an unstacked branch.
If BRANCH is omitted, an unstacked branch with a generated name is created.
Attempting to pick onto a branch that exists but is not applied is an error.
-A,--above<BRANCH_OR_COMMIT>— Place the picked commits above BRANCH_OR_COMMIT.
If BRANCH_OR_COMMIT is a commit, the picked commits are placed on the same branch as the targeted commit.
If BRANCH_OR_COMMIT is a branch, the picked commits are placed on a new branch above the targeted branch.
-B,--below<BRANCH_OR_COMMIT>— Place the picked commits below BRANCH_OR_COMMIT.
If BRANCH_OR_COMMIT is a commit, the picked commits are placed on the same branch as the targeted commit.
If BRANCH_OR_COMMIT is a branch, the picked commits are placed on a new branch below the targeted branch. Branches are treated as buckets, meaning that "below a branch" is treated as below the oldest ancestor on that branch.
--allow-merged— Allow targeting branches and commits that are already merged upstream.
By default, mutations refuse to touch history that has landed in the target branch, since the results tend to conflict on the next but pull.
Last updated on