Reputation: 21
A developer completed a new feature last month and I've completed the review, test, etc and merge that feature branch into release branch this month. Now I need to collect my current month's release branch changes and I'm using the below git command to see the changes applied to the release branch. Unfortunately the above mentioned feature changes are not listing since the commit date for above changes doesn't fall under the date I've selected. For me, the change has been delivered to release branch now and I need to count those change towards this month release churn metrics.
git log --after='2017-07-01 00:00:00' release/1.0
Any quick and easy thoughts on this?
As a workaround, currently I'm achieving the above functionality by collecting the full release branch log every month and do a diff between previously saved last month git log o/p file. The resulting diff will have all changes since last month's saved log.
Upvotes: 2
Views: 1658
Reputation: 60235
git log --first-parent --merges --since=2017-06-01T00:00Z release/1.0 \
--pretty='git rev-list %H^1..%H' \
# | sh
Find all merges to release/1.0 this month, for each list the commits added to the history by that merge. Swap your favorite pretty log format for the rev-list, this just shows you how to get the list.
Upvotes: 2