bash : add gu for specifying git user.
This commit is contained in:
parent
60883482d5
commit
47dd82bab0
|
@ -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}"
|
||||
}
|
||||
|
|
Reference in a new issue