Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the svn:mergeinfo equivalent for git?

Tags:

git

merge

svn

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.

like image 588
Chris Avatar asked Oct 31 '12 08:10

Chris


1 Answers

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.

like image 140
Jamey Sharp Avatar answered Oct 29 '22 15:10

Jamey Sharp