Tutorial by Examples

git cherry-pick <commit-hash> will apply the changes made in an existing commit to another branch, while recording a new commit. Essentially, you can copy commits from branch to branch. Given the following tree (Source) dd2e86 - 946992 - 9143a9 - a6fd86 - 5a6057 [master] \ ...
git cherry-pick <commit-A>..<commit-B> will place every commit after A and up to and including B on top of the currently checked-out branch. git cherry-pick <commit-A>^..<commit-B> will place commit A and every commit up to and including B on top of the currently checked-out...
Before you start the cherry-pick process, you can check if the commit you want to cherry-pick already exists in the target branch, in which case you don't have to do anything. git branch --contains <commit> lists local branches that contain the specified commit. git branch -r --contains <...
Command git cherry shows the changes which haven't yet been cherry-picked. Example: git checkout master git cherry development ... and see output a bit like this: + 492508acab7b454eee8b805f8ba906056eede0ff - 5ceb5a9077ddb9e78b1e8f24bfc70e674c627949 + b4459544c000f4d51d1ec23f279d9cdb19c1d32b...

Page 1 of 1