function gm
    if count $argv >/dev/null
        git merge $argv
    else
        set -l remote (git symbolic-ref refs/remotes/origin/HEAD | awk -F'/' '{print $4}')
        git merge origin/$remote
    end
end
