diff --git a/smart-commit/smart-commit.sh b/smart-commit/smart-commit.sh new file mode 100755 index 0000000..5e3c42d --- /dev/null +++ b/smart-commit/smart-commit.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +STATUS=$(git status --porcelain) +STATUS_LEN=${#STATUS} +if [ $STATUS_LEN = 0 ]; then + exit 0 +else + git add . + git commit --verbose # -qm "CI/CD Commit: $(date -Iseconds)" +fi