Cherry Picking is an art form.

Have you ever used the art form of cherry-picking? I’m not talking about the form of actually picking cherries. I’m speaking about the programming term of cherry-picking from a git commit history.

Per the  documentation:

git-cherry-pick β€” Apply the changes introduced by some existing commits

Cherry-picking in git is the art of taking a commit from a different branch and applying it to your current branch. It takes the state of the files in that commit β€” all the changes that happened in that branch β€” and applies them to the branch you are currently on.

Think of picking a cherry from one tree branch, and stapling it to another.

While this doesn’t actually work with real cherries, you can use this method to pull specific changes from one branch over to the branch you’re currently working on.

#development #git #learning #programming

Cherry Picking πŸ’ in Git
1.45 GEEK