What does cherry-picking a commit with Git mean

0 votes

Hi Guys,

I am learning Git. Recently. I got to know one word cherry-picking in Git. Can anyone tell me what it means?

Dec 23, 2020 in Git & GitHub by akhtar
• 38,210 points

1 answer to this question.

0 votes


Git cherry-pick is a powerful command that enables arbitrary Git commits to be picked by reference and appended to the current working HEAD. Cherry-picking is the act of picking a commit from a branch and applying it to another. git cherry-pick can be useful for undoing changes.

  • Make sure you are on the branch you want to apply the commit to.

$ git checkout master
  • Execute the following command.

$ git cherry-pick <commit-hash>
answered Dec 23, 2020 by MD
• 95,300 points

Related Questions In Git & GitHub

0 votes
1 answer

gerrit-cherry-pick:fatal: 'origin' does not appear to be a git repository

The user account making that command does ...READ MORE

answered Aug 13, 2018 in Git & GitHub by Kalgi
• 52,370 points
0 votes
1 answer

What all does a version control like git allow us to do?

Version control basically keeps a track of ...READ MORE

answered Feb 16, 2019 in Git & GitHub by Mariam
0 votes
1 answer

How to solve the ‘Git commit -a error’?

This happens when no editor is set. ...READ MORE

answered Jul 5, 2018 in Git & GitHub by Tyrion anex
• 8,690 points
0 votes
1 answer

How to forcefully commit a file to Git even if the file is ruled as unchanged?

This is simple, just follow the below ...READ MORE

answered Jul 11, 2018 in Git & GitHub by Sophie may
• 10,550 points
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
0 votes
1 answer

How to revert a Git repository to a previous commit?

Hi@akhtar, This depends a lot on what you ...READ MORE

answered Dec 21, 2020 in Git & GitHub by MD
• 95,300 points
0 votes
1 answer

How to move the most recent commits to a new branch with Git?

Hi@akhtar, If you want to move your commits ...READ MORE

answered Dec 22, 2020 in Git & GitHub by MD
• 95,300 points