Here is an adaptation of the above answer for OSX
Function:
function git {
local tmp=$(mktemp -t git)
local repo_name
if [ "$1" = clone ] ; then
command git "$@" --progress 2>&1 | tee $tmp
repo_name=$(awk -F\' '/Cloning into/ {print $2}' $tmp)
rm $tmp
printf "changing to directory %s\n" "$repo_name"
cd "$repo_name"
else
command git "$@"
fi
}