Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
When I merge branches, I frequently want to get a summary of all the file differences between the branches.
git diff --stat -r branch1..branch2
works great for this, but I want to have author and date from the latest commit that touched that file as well. The output would look something like this:
ChangeColumns.cls | Author1 | 2/10/2015 | 95 ++++++++--------------
GiftApprovalController.cls | Author2 | 2/11/2015 | 2 +-
MassRelationshipCreation.cls | Author3 | 2/10/2015 | 2 +-
MultiselectedPicklist.cls | Author4 | 2/08/2015 | 17 ++--
Paginator.cls | Author1 | 2/09/2015 | 11 ++-
PipelineManager.cls | Author4 | 2/10/2015 | 7 +-
TestSetupUtils.cls | Author4 | 2/08/2015 | 13 ++-
PipelineManager.page | Author2 | 2/07/2015 | 5 +-
TestCoverageJsonData.resource | Author1 | 2/10/2015 | 10 ++-
9 files changed, 78 insertions(+), 84 deletions(-)
Is there any way to do this?
–
–
–
–
Though not exactly but git log
should get you something closer to what you expect,
git log branch1..branch2 --pretty=format:"%h%x09%an%x09%ad%x09%s"
This will only show you commit differences that branch2
has but branch1
doesn't. You will have to reverse it for the getting the commits present in branch1
but not in branch2
.
Add a --stat
or --name-only
to obtain file names
git log branch1..branch2 --pretty=format:"%h%x09%an%x09%ad%x09%s" --stat
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.