We have a workflow where committed code needs to be reviewed by other devs. In simple cases this can be done with “git diff oldhash newhash > diff.txt” and upload that to our review board.
But is there a way to create a diff over several commits and exclude commits done in between by someone else. For example I want to create diff over mine1 to mine4 but exclude Joe’s commit :
mine4
mine3
joe's
mine2
mine1
Any ideas how to do this in command line git or with some other tool?
The commits made by others affect different files than my commits, so in this case it is just about excluding changes made by others.
You could achieve this by creating a new branch combined with cherry-pick:
When you’re done, just delete the branch. Note that the sha1 hashes will be different when diffing, which is what mine1_ and mine4_ indicates.