Tuesday 15 March 2011

Git: Determine All Commits Made to a Merged Branch? -



Git: Determine All Commits Made to a Merged Branch? -

this question has reply here:

git: how list commits on branch not merged branches 3 answers

so here's our nowadays situation. have 'dev' branch (which has changes won't go 'master'/production) , 'x' feature branch couple of developers have been working on.

throughout span of dev on feature branch 'x', there normal commits 'dev' merged in several times (including other branch commits 'dev') deployed our qa instance testing.

aside checking commit messages devs have troubled indicate ticket number working on, there way determine commits made straight 'x' feature branch opposed commits came along merges?

yes there is. git log origin/x ^origin/dev give log of origin/x of origin/dev's commits removed. may want exclude commits prior x forking master well...

and if want go farther can seek adding --first-parent (i'm told others though may or may not work based on other users next same parentage rules) , --no-merges hide merge commits may or may not want.

another handy tip utilize shortlog instead of log give more of abbreivated summary can handy release notes, or communication of whats in branch.

git

No comments:

Post a Comment