diff --git a/document/linux/config/bash/module/git.sh b/document/linux/config/bash/module/git.sh index 42d10ce..bd9aaf1 100644 --- a/document/linux/config/bash/module/git.sh +++ b/document/linux/config/bash/module/git.sh @@ -45,3 +45,19 @@ gr() git rebase -i HEAD~${base} fi } + +# specify git user. +# usage: gu [NAME] [EMAIL] +gu() +{ + local name="${1}" + local email="${2}" + + if [[ "${name}" = "" || "${email}" = "" ]]; then + echo "usage: gu [NAME] [EMAIL]" + return 1 + fi + + git config user.name "${name}" + git config user.email "${email}" +}