🍒What IS git cherry-pick? 🍒

What is cherry-pick

git-cherry-pick — Apply the changes introduced by some existing commits

https://git-scm.com/docs/git-cherry-pick

[Use case]
You are working on a branch from develop and your co-worker is also working on a branch from develop. He/She has fixed an issue(commit ID xxxyyyzzz000). You want to take in that bug fix from his/her branch, but you don't want to take in some commit he/she did.

Diff between merge and cherry-pick

Image for post
Image for post

How to check commit ID

  1. you can check it from log

By the way, basically, you don’t need the entire commit ID.
You just need around 6 digits from the end that GitHub shows on a repo.

  1. you can check it on GitHub/Gitlab etc

Go to your repo and check your commits on a branch

Image for post
Image for post

Written by

#CreativeCoding #Art #PhysicalComputing #IoT #MachineLearning #python #creativetech

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store