Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git stable branch: find not cherry-picked commits

Tags:

I have the following git history:

A --- B --- C --- D' --- E' [master]
 \
  \ --- D --- E --- F [stable]

We have a policy to cherry-pick all changes from stable to master; D' and E' are cherry-picked commits from stable branch, F is not cherry-picked (has been forgotten).

How can I get a diff that bings up F (which was not cherry-picked into master)?


We don't want use merge because:

  • cleaner history without merge commits
  • commits to stable are rare
  • we have lots of different stable branches
like image 329
Niko Sams Avatar asked Feb 15 '12 07:02

Niko Sams


1 Answers

That's exactly what the git cherry command is for.

It should never miss unpicked change, but it might occasionally list a change you consider picked if the pick involved conflict resolution.

like image 56
Jan Hudec Avatar answered Oct 20 '22 00:10

Jan Hudec