When would you use git cherry-pick? Follow:
Short answer: git cherry-pick lets you apply a specific commit from one branch to another, without merging the entire branch.
Explain a bit more
Example: Imagine you fixed a typo in the develop branch but need that same fix in main immediately. Instead of merging all of develop, you can just cherry-pick that commit: git cherry-pick 1a2b3c4 Real-world use case: Useful when you want to apply a hotfix or small bug fix without merging unrelated feature work.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png