Created
July 20, 2020 07:46
-
-
Save seeliang/22ac0ed62de954586680881634922db3 to your computer and use it in GitHub Desktop.
Run script based on git diff and path
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
if ! git diff-index --quiet --relative=src HEAD^; # with compare git diff target (HEAD^) and path (src) | |
then | |
echo has change; | |
# run | |
else | |
echo no change | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment