git - List all commits in a topic branch -


i have feature branch concisely named feature has 100 commits related feature of sorts. these commits merged master branch on time. want list commits on branch can re-add feature other project.

basically want have commit ids green dots on graph below.

relevant commits

how can in git other going gitk or similar tool , hand-collecting relevant commit ids?

despite answer given , accepted suggest more automatic way doing (but work if did not merge master feature):

considering following history:

--a---b---c---d---e---f---g (master)        \     /       /         h---j-------k       (feature) 

basically want perform git log b..feature.

git log --format='%h' feature..master | tail -1 | \ xargs -i '{}' git log '{}'^..feature 

git log --format='%h' feature..master | tail -1 find commit master done right after created feature branch - c

and ancestor of c - b ancestor of first commit h of feature branch.

then xargs -i '{}' git log '{}'^..feature (that turns git log b..feature) shows commits reachable feature don't reachable b.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -