Given a range of commits like
b9dc80c commit msg 1 #530 88a4d3c another commit 1010bce commit msg 2 #530 040ac6d commit msg 3 #530 6b72683 another commit ed17416 another commit f49bbbd commit msg 4 #530
I would like to see diff of all changes in commits using #530 . So far, I have all the relevant hashes in a convenient format.
git log --oneline | grep
Can I somehow merge these commits into one diff? That is, combine in memory without actually affecting the original repository. I know that I can cherry pick these commits in a separate branch and differentiate it, but it's too complicated.
The use case is that I want to see all the changes with the specified ticket identifier.
Example:
echo a > file git add file && git commit "first" echo b > file git add file && git commit "second #XX" echo a > file git add file && git commit "third #XX" the-special-command
with the "diff" I meant, the "comparison" #XX commits should give empty output instead of two separate changes to file .
source share