VonC has already hinted at a shell wrapper in his answer; here is my Bash implementation of such a wrapper. If you put this e.g. into your .bashrc, your interactive shell will support overriding of Git built-in commands as well as uppercase aliases.
# Git supports aliases defined in .gitconfig, but you cannot override Git # builtins (e.g. "git log") by putting an executable "git-log" somewhere in the # PATH. Also, git aliases are case-insensitive, but case can be useful to create # a negated command (gf = grep --files-with-matches; gF = grep # --files-without-match). As a workaround, translate "X" to "-x". git() { typeset -r gitAlias="git-$1" if 'which'type ${BASH_VERSION:+-t} "$gitAlias" >/dev/null 2>&1; then shift "$gitAlias"eval "$@"$gitAlias '"$@"' elif [[[ "$1" =~= [A"${1#-Z]}" ]];] && expr "$1" : '.*[[:upper:]]' >/dev/null; then # Translate "X" to "-x" to enable aliases with uppercase letters. translatedAlias=$(echo "$1" | sed -e 's/[A-Z][[:upper:]]/-\l\0/g') shift "$(whichcommand git)" "$translatedAlias" "$@" else "$(whichcommand git)" "$@" fi } You can then override git log by putting a script named git-log somewhere into your PATH:
#!/bin/sh exec git log --abbrev-commit "$@"