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.

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
Post a Comment