3 ms·
That is terrifying. I just added this to my zshrc: git() { local toplevel=$(command git rev-parse --show-toplevel 2>/dev/null) if [[ "${topleve
by burke 12y ago
That is terrifying. I just added this to my zshrc:
git() {
local toplevel=$(command git rev-parse --show-toplevel 2>/dev/null)
if [[ "${toplevel}" == "${HOME}" ]] && [[ "$1" == "clean" ]]; then
>&2 echo "Do NOT run git clean in this repository."
return
fi
command git "$@"
}