What is the svn: mergeinfo equivalent for git?

I am missing the clean info about mergein in git:

  • What commits (a list including comments) was merged using commit
  • What commits was NOT combined with fixation.

How can I get them? SVN had a very useful concept for mergeinfo.

+4
source share
2 answers

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

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

     git log bar..foo 
  • You can list all commits from any local branch that are not merged into the bar branch using:

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

  • Perhaps this is what you want to see which commits were new, since the common ancestor of both parents is merging, although I don't think the question is clear:

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

+2
source

To completely merge SVN branches, the Git equivalent is a complete Git merge of branches (i.e. merge merge with multiple parents).

There is no strict equivalent for cherry cherry SVN. But if you use the git cherry-pick command, it saves a commit message. Personally, I use this commit message to figure out if a change is present in a particular branch.

+1
source

Source: https://habr.com/ru/post/1443173/


All Articles