set-git-author
v0.0.3
Published
set a suitable git author by some rules, such as remote repo
Readme
set-git-author
set a suitable git author by some rules, such as remote repo.
Usage
Notice: you can use install it globally by npm/yarn, or use it directly by
npx set-git-author
set remote repo rules
$HOME/.set-git-author.json:{ "author": { "git-(biz|open).xxx.cn": "LiLuo <[email protected]>", "(github|gitlab).com": "MwumLi <[email protected]>" } }Conf Explain
- if git remote repo is git-biz.xxx.cn/git-open.xxx.cn, use
LiLuo <[email protected]> - if git remote repo is github.com/gitlab.com, use
MwumLi <[email protected]> - else (no match or default), use your git config in your computer.
- if git remote repo is git-biz.xxx.cn/git-open.xxx.cn, use
set alias fot
gitcommnad in$HOME/.bashrc:alias git=`set-git-author && git`aliascan be placed in~/.bashrcor~/.zshrc, depending on your terminal environment.just run
gitis okay ! (no need to worry about the committer's mistakes😜)
