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,170 points
105 views

1 answer to this question.

0 votes

Hi@akhtar,

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,160 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,310 points
684 views
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
246 views
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,660 points
810 views
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
1,956 views
+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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,064 views
+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,160 points
57 views
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,160 points
64 views