A common question I get from co-workers is, “How do I see if I already merged my changes into my master branch?”. My usual suggestion was to use git diffbut I've started telling them to look atgit cherry` (NOT git-cherry-pick).
From the new Git documentation, git-cherry finds commits not merged upstream.
I use it like this while on the master branch to see what commits are in master that are not on the feature-branch-name branch:
| |
The -v option prints out the commit SHAs and messages. If I am already on the feature-branch-name branch, I can type the following to get the same effect:
| |
The results typically looks something like:
| |
That means those commits are on feature-branch-name branch but not in master