Created
June 4, 2020 21:49
-
-
Save MaxXx1313/f1d2f14030890215269763aac2705d45 to your computer and use it in GitHub Desktop.
git check if any file is changed
This file contains hidden or 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
# | |
hasChanges=$(git diff-index --name-only HEAD --) | |
if [ -n "$hasChanges" ]; then | |
echo -e "*** Git repository is not clean!" | |
gitSha="$gitSha-DIRTY" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment