Skip to main content
  1. Learn center
  2. Software Development
  3. Guides
  4. Git tutorial
  5. Git basics
  6. Managing Git history
  7. Copying commits to other branches
GuidesSoftware DevelopmentBacklog
Git

Project and code management together.

Copying commits to other branches

You can copy an existing commit from another branch to the current branch within the repository using the git cherry-pick command.

Cherry-picking allows you to:

  • Move a commit from the wrong branch to the right branch.
  • Add a commit to the current branch based on an existing commit from another branch.
Diagram using the cherry-pick command.
Use git cherry-pick to change the branch of a commit.

Subscribe to our newsletter

Learn with Nulab to bring your best ideas to life