# Cherry-pick

Cherry-pick, essentially, will duplicate the changes from the original commit to a new commit of the current branch.

It is useful but not limited to such scenarios

* When sometimes we want some but not all the commits from a branch, for example, porting back a bug fix from v2.0 to v1.8. &#x20;
* When we were too lazy or forgot to create a new branch for the commits, and after finished the work we realized the commits were done on the wrong branch. We'd like to create a new branch basing on the right commit/branch and cherry-pick these commits.
* Sometimes it's much faster than a rebase. For example when `master` branch is way ahead from our current branch, rebasing will need to evaluate all the commits in between which is slow.

To cherry-pick in GitExtensions, first we select a couple of commits to cherry-pick (the order doesn't matter, GitExtensions always does the oldest one first), then right click to popup the context menu and select `Cherry-Pick` menu item. BTW, you can hold the CTRL key to select multiple commits.

![](/files/-LSKEfwuolHrd_8CWvwZ)

Unticking the `Automatically create a commit` will only pick up the changes but not create the commit.

Ticking the `Add commit reference to commit message` will put the original commit SHA as part of the new commit message body. It's no point to&#x20;

Command line

```
git cherry-pick <Commit SHA> [Another Commit SHA]
# use the -x switch to add commit reference to original commit
git cherry-pick -x <Commit SHA> [Another Commit SHA]
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gittutorial.gitbook.io/practical-git-via-gitextensions/how-to-make-a-commit/cherry-pick.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
