Git cherry-pick

Git cherry-pick 1

cherry-pick command helps in migrating commits from one branch to another branch .coomon uses of cherry-picking is to rearrage the order of commits in a sustainable manner .the main important thing is order of commits before using cherry-pick .this creates new commit with different commit id after the current commit (HEAD)

syntax:

git cherry-pick <Commit1> <Commit2> <...>  

here, first commit1 will be processed next commit2 .the order will be left to right ,starting to ending.

Single commit from other branch

git cherry-pick <commit id>

CHERRY-PICK but don’t commit

git cherry-pick -n <commit id>

Force commit from same branch

git cherry-pick  --ff <commit id>

Default image
Vishal Devxo
Vishal Devxo is a DevOps engineer and a Backend developer, he spends all his time for creating good tutorials with better visuals and blogging, developed some projects based on Python-Django, some hacking modules and scripts in python