I am trying to make an alias for
mv so it does its normal behaviour in normal folders and is replaced by
git mv inside git repositories. I tried many ways. The
if statement works, only the command
git mv will not run correctly.
alias mv='"$( if [ x`git rev-parse --show-toplevel 2> /dev/null` = x ]; echo mv; else echo "git mv"; fi)"'