File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2525 then
2626 thisfile=${file/.\*/\*}
2727 echo "File $thisfile is protected but has local changes."
28- echo "Restore the file with 'git restore "${thisfile}"' before commiting anything, or force this commit with 'commit --no-verify'."
28+ echo "Restore the file with 'git restore "${thisfile}"' before commiting anything,"
29+ echo "or force this commit with 'git commit --no-verify'."
2930 exit 1
3031 fi
3132 git diff --cached --name-only | grep '^'${file}'$' &> /dev/null
3233 if [ $? -eq 0 ]
3334 then
3435 thisfile=${file/.\*/\*}
3536 echo "File $thisfile is protected but has local changes that are staged."
36- echo "Restore the file with 'git restore "${thisfile}"' before commiting anything, or force this commit with 'commit --no-verify'."
37+ echo "First unstage the file with 'git restore --staged "${thisfile}"', then "
38+ echo "restore the file with 'git restore "${thisfile}"' before commiting anything."
39+ echo "Alternatively, force this commit with 'git commit --no-verify'."
3740 exit 1
3841 fi
3942done
You can’t perform that action at this time.
0 commit comments