git user configuration override

In case if it's required to have a different user configuration from the one stored in .gitconfig, there is two possible ways to achieve this:

Local (per git)
$ cd git-repo
$ git config user.name "Name Surname"
$ git config user.email "name.surname@domain.com"

This method will override default or git's user configuration. Add following to .bashrc:
function gitswitch () {
    case "$1" in
        export GIT_AUTHOR_EMAIL="name.surname@domain.com"
        export GIT_AUTHOR_NAME="Name Surname"
        export GIT_COMMITTER_EMAIL="name.surname@domain.com"
        export GIT_COMMITTER_NAME="Name Surname"
        echo "Using custom configuration."
        unset GIT_AUTHOR_EMAIL
        unset GIT_AUTHOR_NAME
        unset GIT_COMMITTER_NAME
        echo "Using default configuration from .gitconfig."
        echo "Bad argument - please specify 'custom' or 'default'."
And then:
$ gitswitch custom
Using custom configuration.
$ gitswitch default
Using default configuration from .gitconfig.
$ gitswitch ?
Bad argument - please specify 'custom' or 'default'.