Take the 2-minute tour ×

I am missing clean mergeinformation in git:

  • What commits (list including comments) have been merged by a commit
  • What commits have NOT been merged by a commit.

How can I get those? In SVN there was very useful concept of mergeinfo.

share|improve this question
Have you tried variations of git log branch_point..merge_point (or alternatively git show with a range)? AFAIK git has no concept of merging only a range of revisions from a branch (for that use e.g. git cherry-pick), so what svn mergeinfo does seems a little redundant in git. –  Benjamin Bannier Oct 31 '12 at 8:53
add comment

2 Answers

up vote 2 down vote accepted

I'm not sure exactly what situation you're trying to address.

  • You can list the commits from branch foo that are not yet merged into branch bar using:

    git log bar..foo
  • You can list all commits from any local branch that aren't merged into branch bar using:

    git log --branches --not bar
  • If you want remote branches, use --remotes. See git-rev-list(1) for more variations.

  • Perhaps this is what you want for seeing what commits were new since the common ancestor of both parents of a merge, although I don't think the question is clear:

    git log <merge-commit>^1...<merge-commit>^2
  • You can see which commits are cherry-picked between two branches using git cherry.

share|improve this answer
Looks promising, can you double, whether a "Not" is missing? –  crudolf Nov 7 '12 at 20:14
I'm afraid I don't understand your question... –  Jamey Sharp Nov 7 '12 at 22:00
add comment

For full SVN branch merges Git equivalent is full Git branch merge (i.e. existence merge-commit with several parents).

For SVN cherry-pick there's no strict equivalent. But if you use git cherry-pick command, it preserves commit message. Personally I use this commit message to understand if the change is present in a certain branch.

share|improve this answer
add comment

Your Answer


