Created
December 5, 2020 11:30
-
-
Save adikari/2e3e084347f35fb257935711fb9611f4 to your computer and use it in GitHub Desktop.
git diff commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ $# -lt 1 ] && { echo "argument is missing."; exit 1; } | |
COMMIT=$1 | |
BRANCH_POINT_COMMIT=$(git merge-base master $COMMIT) | |
echo "diff between $COMMIT and $BRANCH_POINT_COMMIT" | |
git --no-pager diff --name-only $COMMIT..$BRANCH_POINT_COMMIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment