by mrinterweb · 2y ago · 0 comments
So if you know a commit sha and you'd like to see all of the merged branch changes associated with that commit as a single patch, I cooked up a script that takes a commit sha and finds the merge commit and show all the changes in a consolidated patch.
#!/bin/sh
merge_commit=$(git log -n1 --merges --pretty=format:"%H" $(git rev-list --ancestry-path $1..HEAD --merges -n1))
git show -m -p --stat --format="" $merge_commit
No comments yet.