3 个稳定版本
2.0.0 | 2020 年 1 月 8 日 |
---|---|
1.0.1 | 2019 年 12 月 3 日 |
1.0.0 | 2019 年 12 月 2 日 |
#172 in 电子邮件
225KB
932 代码行
git-author
概述
- 您可以在 oece 中获取或设置 user.name 和 user.email。
- 您可以一次性取消设置 user.name 和 user.email。
- 您可以替换过去提交的作者或提交者。
安装
$ cargo install git-author
用法
# get
$ git author [config file location]
$ git author get [config file location]
# set
$ git author set [config file location] <name> <email>
# unset
$ git author unset [config file location]
# replace-simple
$ git author replace simple <old-name> <old-email> [new-name] [new-email]
# replace-detail
$ git author replace detail --filter-author <name> <email> --filter-committer <name> <email> --replace-target <replace-target>
描述
获取
$ git author [config file location]
$ git author get [config file location]
您可以得到 user.name 和 user.email。
设置
$ git author set [config file location] <name> <email>
您可以使用以下命令设置 user.name 和 user.email:git author set foo [email protected]
。
取消设置
$ git author unset [config file location]
您可以取消设置 user.name 和 user.email。
替换
简单
$ git author replace simple <old-name> <old-email> [new-name] [new-email]
在过去的提交中将作者或提交者的 旧名称
替换为 旧电子邮件
,将 新名称
替换为 新电子邮件
。
如果省略了新名称和新电子邮件,则使用 git author
可以获取的名称和电子邮件。
详细
$ git author replace detail --filter-author <name> <email> --filter-committer <name> <email> --replace-target <replace-target>
选项
--filter-author <name> <email> filter with author. Required when `filter-committer` is not specified.
--filter-committer <name> <email> filter with committer. Required when `filter-author` is not specified.
--filter-type <filter-type> You can specify `and` or `or`. Valid only both `filter-author` and `filter-
committer` are specified. It is ignored at other times.
The defalut is `and`.
If `and` is specified, commits that match `author` and `committer` are
specified, and if `or` is specified, commits that match either `author` or
`committer` are included. [default: and]
--author <name> <email> author after replacement. If not specified, use author which can be
obrtained by `git author get`
--committer <name> <email> committer after replacement. If not specified, use author which can be
obrtained by `git author get`
--replace-target <replace-target> Replacement target. You can specify `author` or`committer` or `author-and-
committer`.
许可证
MIT
依赖关系
~9–12MB
~295K SLoC