We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ca43c8 commit 10c1c3dCopy full SHA for 10c1c3d
resources/checkgit.sh
@@ -8,6 +8,14 @@ trap "exit 1" ERR
8
# and including any changes on main.
9
#
10
11
+# Check that local copy has no modifications
12
+GIT_MODIFIED_FILES=$(git ls-files -dm 2> /dev/null);
13
+GIT_STAGED_FILES=$(git diff --cached --name-only 2> /dev/null);
14
+if [ "$GIT_MODIFIED_FILES" != "" -o "$GIT_STAGED_FILES" != "" ]; then
15
+ read -p "Git has local modifications. Continue? (y|N) " yn;
16
+ if [ "$yn" != "y" ]; then exit 1; fi;
17
+fi;
18
+
19
# First fetch to ensure git is up to date. Fail-fast if this fails.
20
git fetch;
21
if [[ $? -ne 0 ]]; then exit 1; fi;
0 commit comments