helper (improvement): added safegaurd for unsaved changes

pull/1890/head
Gurkirat Singh 2021-06-11 12:14:36 +05:30
parent 2444a57cc5
commit 3204229841
1 changed files with 4 additions and 0 deletions

View File

@ -224,6 +224,10 @@ _bash-it-update-() {
cd "${BASH_IT}" || return
DIFF=$(git diff --name-status)
[ ${#DIFF} -gt 0 ] && echo -e "Either commit your changes using git commit, or clean them...\n\n$DIFF" && return 1
if [ -z "$BASH_IT_REMOTE" ]; then
BASH_IT_REMOTE="origin"
fi