Add git as command for managing identities
This commit is contained in:
parent
d3e546e39e
commit
adcd726d61
1 changed files with 9 additions and 0 deletions
9
bin/git-as
Executable file
9
bin/git-as
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
user=$1
|
||||
shift 1
|
||||
export GIT_AUTHOR_NAME="$(git config user.$user.name)"
|
||||
export GIT_AUTHOR_EMAIL="$(git config user.$user.email)"
|
||||
export GIT_COMMITTER_NAME="$(git config user.$user.name)"
|
||||
export GIT_COMMITTER_EMAIL="$(git config user.$user.email)"
|
||||
echo "Running as $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
|
||||
git "$@"
|
Loading…
Reference in a new issue