git author ver 2.0.0の日本語ドキュメントです。
リポジトリ
旧バージョン(ver 1.0)のドキュメントはこちら
Cargoが使える必要があります。
$ 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]
git author
またはgit author get
でuser.nameとuser.emailを取得できます。
$ git author set [config file location] <name> <email>
user.nameとuser.emailを設定できます。
$ git author unset [config file location]
user.nameとuser.emailの設定を削除できます。
過去のコミットのAuthorとCommitterを書き換えます。
サブコマンドとしてsimple
とdetail
が存在します。
$ git author replace simple <old-name> <old-email> [new-name] [new-email]
過去のコミットのAuthor/Committerのold-name <old-email>
をnew-name <new-email>
に置き換えます。
new-name
とnew-email
を省略した場合はgit author
で取得できるnameとemailを使用します。
$ git author replace detail --filter-author <name> <email> --filter-committer <name> <email> --replace-target <replace-target>
指定した条件のコミットのAuthorとCommitterのいずれかまたは両方のnameとemailを置き換えます。
--filter-author <name> <email>
Authorでフィルタリングする場合に指定する。
--filter-committer
が指定されていない場合は必須。
--filter-committer <name> <email>
Committerでフィルタリングする場合に指定する。
--filter-author
が指定されていない場合は必須。
--filter-type <filter-type>
フィルタリング条件にAuthorとCommitterの両方が一致するか片方が一致するかを指定する。
filter-type
にはand
かor
を指定可能。デフォルトはand
。
--filter-author
と--filter-committer
の両方が設定されているときのみ有効。
--author <name> <email>
置き換え後のAuthor。省略した場合はgit author
で取得できるnameとemailを使用する。
--replace-target
でauthor
かauthor-and-committer
が指定されたときのみ使用する。
--committer <name> <email>
置き換え後のCommitter。省略した場合はgit author
で取得できるnameとemailを使用する。
--replace-target
でcommitter
かauthor-and-committer
が指定されたときのみ使用する。
--replace-target
置き換え対象を指定する。
author
: Authorのみcommitter
: Committerのみauthor-and-committer
: AuthorとCommitterが指定可能。