当我合并分支时,我经常希望获得分支之间所有文件差异的摘要。
git diff --stat -r branch1..branch2在这方面做得很好,但我也想知道接触到该文件的最新提交的作者和日期。输出将如下所示:
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(-)有没有办法做到这一点?
发布于 2015-02-11 04:35:31
虽然不完全是,但git log应该会让你更接近你的期望,
git log branch1..branch2 --pretty=format:"%h%x09%an%x09%ad%x09%s"这将只显示branch2有但branch1没有的提交差异,你必须反转它才能获得branch1中的提交,而不是branch2中的提交。
添加--stat或--name-only以获取文件名
git log branch1..branch2 --pretty=format:"%h%x09%an%x09%ad%x09%s" --stathttps://stackoverflow.com/questions/28440829
复制相似问题