0

I'm trying to understand the changes of a small team that worked on a baseline. Unfortunately, that team already merged in their work to the develop branch and have now been updating that branch in non-consecutive order with the commits of the main team.

I figure the best way to understand their work would be to take their current work and compare it against the source they started with but now I have all the main team changes in the comparison. I was wondering is there a way for me to isolate just the changes the small team made (i.e., the work they did initially in a branch, and then all the commits they did on the main develop branch) so I can then compare it to a specific commit they started as the base of their work?

This is become cumbersome because of the main team's changes have been added in between their commits so there isn't a consecutive block of commits I can just do a simple comparison, so that is why I was wondering would it be possible to just isolate their commits and compare it to their starting commit. Thanks!

LeanMan
  • 474
  • 1
  • 4
  • 18
  • Does this answer your question? [How can I view a git log of just one user's commits?](https://stackoverflow.com/questions/4259996/how-can-i-view-a-git-log-of-just-one-users-commits) – SwissCodeMen Sep 18 '20 at 20:21
  • No it doesn't because I am looking for a patch file with the changes that I can apply on top of base commit. Looking at commit comments or changes per commit is not enough. The changes need to be flattened into one commit and then be able to be applied. – LeanMan Sep 18 '20 at 21:49

1 Answers1

0

You could filter the commits by author with git log:

git log --author='^(Paolo|John).*$' --perl-regexp

this would show all the commits me and John did.

Paolo
  • 21,270
  • 6
  • 38
  • 69
  • Hi Thank you for the response, but I'm interested in seeing all the changes as a commit so I can compare using a difftool like BeyondCompare. Seeing it as commit logs or its derivatives won't achieve that. – LeanMan Sep 18 '20 at 21:50
  • What do you mean? You can just pipe the output of the commit ids to git diff – Paolo Sep 18 '20 at 23:23
  • For example, if I have file that has had 100 commits that are from 5 people in non-contiguous order. If none of these changes depend on the one before it, I want to produce the same file but with the changes that were only produced from 3 of the 5 authors. This way I can take a closer look at what the other two people did on the file. This is just a hypothetical example, but essentially in my specific case, the two people would represent a sub-team that was working on a large repository. Does that make sense? – LeanMan Sep 21 '20 at 12:47
  • I believe your method only addresses the commit logs which if are numerous would require multiple git diff commands to look through each change. I'm looking for a flattened way to do this so I only need one git diff command. – LeanMan Sep 21 '20 at 12:49