bash : add gu for specifying git user.

This commit is contained in:
Dmitry Voronin 2023-10-12 13:06:34 +03:00
parent 60883482d5
commit 47dd82bab0

View file

@ -45,3 +45,19 @@ gr()
git rebase -i HEAD~${base} git rebase -i HEAD~${base}
fi 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}"
}