am

NAME

git-am - Apply a series of patches from a mailboxgit-am - メールボックスから一連のパッチを適用する

SYNOPSIS概要

git am [--signoff] [--keep] [--[no-]keep-cr] [--[no-]utf8]
	 [--[no-]3way] [--interactive] [--committer-date-is-author-date]
	 [--ignore-date] [--ignore-space-change | --ignore-whitespace]
	 [--whitespace=<option>] [-C<n>] [-p<n>] [--directory=<dir>]
	 [--exclude=<path>] [--include=<path>] [--reject] [-q | --quiet]
	 [--[no-]scissors] [-S[<keyid>]] [--patch-format=<format>]
	 [(<mbox> | <Maildir>)…​]
git am (--continue | --skip | --abort | --quit | --show-current-patch)

DESCRIPTION説明

Splits mail messages in a mailbox into commit log message, authorship information and patches, and applies them to the current branch.メールボックス内のメールメッセージをコミットログメッセージ、作成者情報、およびパッチに分割し、それらを現在のブランチに適用します。

OPTIONSオプション

(<mbox>|<Maildir>)…​ (<mbox> | <Maildir>)…

The list of mailbox files to read patches from. If you do not supply this argument, the command reads from the standard input. If you supply directories, they will be treated as Maildirs.パッチを読み込むメールボックスファイルのリスト。この引数を指定しないと、コマンドは標準入力から読み取ります。ディレクトリを指定した場合、それらはMaildirsとして扱われます。

-s
--signoff - サインオフ

Add a Signed-off-by: line to the commit message, using the committer identity of yourself. See the signoff option in git-commit[1] for more information.Signed-off-by:自分のコミッターIDを使用して、コミットメッセージに1 行追加します。詳細についてはgit-commit [1]のsignoffオプションを参照してください。

-k
--keep - キープ

Pass -k flag to git mailinfo (see git-mailinfo[1]).通過-kにフラグをGitのmailinfo(参照[1]のgit-mailinfoを)。

--keep-non-patch

Pass -b flag to git mailinfo (see git-mailinfo[1]).通過-bにフラグをGitのmailinfo(参照[1]のgit-mailinfoを)。

--[no-]keep-cr - [no-] keep-cr

With --keep-cr, call git mailsplit (see git-mailsplit[1]) with the same option, to prevent it from stripping CR at the end of lines. am.keepcr configuration variable can be used to specify the default behaviour. --no-keep-cr is useful to override am.keepcr.では--keep-cr、同じオプションを指定してgit mailsplitgit-mailsplit [1]を参照)を呼び出し、行末でCRが削除されないようにします。am.keepcr設定変数はデフォルトの振る舞いを指定するために使うことができます。--no-keep-cr上書きすると便利ですam.keepcr

-c
--scissors - はさみ

Remove everything in body before a scissors line (see git-mailinfo[1]). Can be activated by default using the mailinfo.scissors configuration variable.はさみの行の前にある本文部分をすべて削除します(git-mailinfo [1]を参照)。mailinfo.scissors構成変数を使用してデフォルトで活動化できます。

--no-scissors - はさみ

Ignore scissors lines (see git-mailinfo[1]).はさみの行を無視します(git-mailinfo [1]を参照)。

-m
--message-id

Pass the -m flag to git mailinfo (see git-mailinfo[1]), so that the Message-ID header is added to the commit message. The am.messageid configuration variable can be used to specify the default behaviour.Message-IDヘッダがコミットメッセージに追加されるように、-mフラグをgit mailinfoに渡しますgit-mailinfo [1]を参照)。am.messageid設定変数は、デフォルトの動作を指定するために使用することができます。

--no-message-id

Do not add the Message-ID header to the commit message. no-message-id is useful to override am.messageid.コミットメッセージにMessage-IDヘッダを追加しないでください。no-message-id上書きすると便利ですam.messageid

-q
--quiet - 静か

Be quiet. Only print error messages.静かにして。エラーメッセージのみを表示します。

-u
--utf8

Pass -u flag to git mailinfo (see git-mailinfo[1]). The proposed commit log message taken from the e-mail is re-coded into UTF-8 encoding (configuration variable i18n.commitencoding can be used to specify project’s preferred encoding if it is not UTF-8).通過-uにフラグをGitのmailinfo(参照[1]のgit-mailinfoを)。電子メールから取得されたコミットログメッセージの提案は、UTF-8エンコーディングに再コード化されます(i18n.commitencodingUTF-8でない場合は、構成変数を使用してプロジェクトの優先エンコーディングを指定できます)。

This was optional in prior versions of git, but now it is the default. You can use --no-utf8 to override this.これは以前のバージョンのgitではオプションでしたが、現在はデフォルトになっています。--no-utf8これを上書きするために使用できます。

--no-utf8

Pass -n flag to git mailinfo (see git-mailinfo[1]).通過-nにフラグをGitのmailinfo(参照[1]のgit-mailinfoを)。

-3
--3way - 3ウェイ
--no-3way - いいえ-3way

When the patch does not apply cleanly, fall back on 3-way merge if the patch records the identity of blobs it is supposed to apply to and we have those blobs available locally. --no-3way can be used to override am.threeWay configuration variable. For more information, see am.threeWay in git-config[1].パッチがきれいに適用されないとき、パッチがそれが適用されることになっているブロブのアイデンティティを記録し、そして我々がそれらのブロブを局所的に利用可能にするならば、3方向マージに頼りなさい。--no-3wayam.threeWay構成変数をオーバーライドするために使用できます。詳細については、git-config [1]の am.threeWayを参照してください。

--ignore-space-change
--ignore-whitespace
--whitespace=<option> --whitespace = <オプション>
-C<n> -C <n>
-p<n> -p <n>
--directory=<dir> --directory = <ディレクトリ>
--exclude=<path> --exclude = <パス>
--include=<path> --include = <パス>
--reject - 拒否

These flags are passed to the git apply (see git-apply[1]) program that applies the patch.これらのフラグは、パッチを適用するgit applygit-apply [1]を参照)プログラムに渡されます

--patch-format - パッチフォーマット

By default the command will try to detect the patch format automatically. This option allows the user to bypass the automatic detection and specify the patch format that the patch(es) should be interpreted as. Valid formats are mbox, mboxrd, stgit, stgit-series and hg.デフォルトでは、コマンドは自動的にパッチフォーマットを検出しようとします。このオプションは、ユーザが自動検出を迂回して、パッチが解釈されるべきであるパッチフォーマットを指定することを可能にする。有効なフォーマットは、mbox、mboxrd、stgit、stgit-series、およびhgです。

-i -私
--interactive - インタラクティブ

Run interactively.対話的に実行してください。

--committer-date-is-author-date

By default the command records the date from the e-mail message as the commit author date, and uses the time of commit creation as the committer date. This allows the user to lie about the committer date by using the same value as the author date.デフォルトでは、このコマンドはEメールメッセージからの日付をコミット作成者日付として記録し、コミット作成日をコミッター日付として使用します。これにより、ユーザーは作成者の日付と同じ値を使用してコミッターの日付についてうそをつくことができます。

--ignore-date

By default the command records the date from the e-mail message as the commit author date, and uses the time of commit creation as the committer date. This allows the user to lie about the author date by using the same value as the committer date.デフォルトでは、このコマンドはEメールメッセージからの日付をコミット作成者日付として記録し、コミット作成日をコミッター日付として使用します。これにより、ユーザーは、コミッターの日付と同じ値を使用して作成者の日付についてうそをつくことができます。

--skip - スキップ

Skip the current patch. This is only meaningful when restarting an aborted patch.現在のパッチをスキップする これは、中止されたパッチを再起動したときにのみ意味があります。

-S[<keyid>] -S [<keyid>]
--gpg-sign[=<keyid>] --gpg-sign [= <keyid>]

GPG-sign commits. The keyid argument is optional and defaults to the committer identity; if specified, it must be stuck to the option without a space.GPG-signがコミットします。keyid引数はコミッターのアイデンティティオプションで、デフォルトです。指定した場合は、スペースなしでオプションに固定する必要があります。

--continue - 持続する
-r
--resolved - 解決済み

After a patch failure (e.g. attempting to apply conflicting patch), the user has applied it by hand and the index file stores the result of the application. Make a commit using the authorship and commit log extracted from the e-mail message and the current index file, and continue.パッチが失敗した(例えば、競合するパッチを適用しようとした)後、ユーザはそれを手で適用しており、インデックスファイルはその適用の結果を記憶する。電子メールメッセージと現在のインデックスファイルから抽出した作成者とコミットログを使用してコミットし、続行します。

--resolvemsg=<msg> --resolvemsg = <msg>

When a patch failure occurs, <msg> will be printed to the screen before exiting. This overrides the standard message informing you to use --continue or --skip to handle the failure. This is solely for internal use between git rebase and git am.パッチエラーが発生すると、終了する前に<msg>が画面に表示されます。これは、失敗を使用--continueまたは--skip処理するようにユーザーに通知する標準メッセージをオーバーライドします。これはgit rebasegit amの間の内部使用専用です

--abort - アボート

Restore the original branch and abort the patching operation.元のブランチを復元してパッチ適用操作を中止します。

--quit - 終了する

Abort the patching operation but keep HEAD and the index untouched.パッチ適用操作を中止しますが、HEADとインデックスはそのまま残します。

--show-current-patch

Show the patch being applied when "git am" is stopped because of conflicts."git am"が競合のために停止したときに適用されているパッチを表示します。

DISCUSSION討論

The commit author name is taken from the "From: " line of the message, and commit author date is taken from the "Date: " line of the message. The "Subject: " line is used as the title of the commit, after stripping common prefix "[PATCH <anything>]". The "Subject: " line is supposed to concisely describe what the commit is about in one line of text.コミット作成者名はメッセージの "From:"行から取得され、コミット作成者の日付はメッセージの "Date:"行から取得されます。"Subject:"行は、共通のプレフィックス "[PATCH <anything>]"を取り除いた後、コミットのタイトルとして使われます。"Subject:"という行は、コミットの内容を1行のテキストで簡潔に記述するためのものです。

"From: " and "Subject: " lines starting the body override the respective commit author name and title values taken from the headers.本文を開始する "From:"と "Subject:"の行は、それぞれのコミット作成者名とヘッダーから取得したタイトルの値を上書きします。

The commit message is formed by the title taken from the "Subject: ", a blank line and the body of the message up to where the patch begins. Excess whitespace at the end of each line is automatically stripped.コミットメッセージは、 "Subject:"から取ったタイトル、空白行、そしてパッチが始まるところまでのメッセージ本文によって形成されます。各行の終わりにある余分な空白は自動的に取り除かれます。

The patch is expected to be inline, directly following the message. Any line that is of the form:パッチはインラインで、メッセージのすぐ後に続くことが期待されています。次の形式の行

  • three-dashes and end-of-line, or3つのダッシュと行末、または

  • a line that begins with "diff -", or"diff - "で始まる行、または

  • a line that begins with "Index: ""Index:"で始まる行

is taken as the beginning of a patch, and the commit log message is terminated before the first occurrence of such a line.はパッチの始まりと見なされ、コミットログメッセージはそのような行が最初に現れる前に終了します。

When initially invoking git am, you give it the names of the mailboxes to process. Upon seeing the first patch that does not apply, it aborts in the middle. You can recover from this in one of two ways:最初に起動するときにgit am、処理するメールボックスの名前を付けます。適用されない最初のパッチを見ると、途中で中止します。これから回復するには、2つの方法があります。

  1. skip the current patch by re-running the command with the --skip option.--skipオプションを指定してコマンドを再実行して、現在のパッチをスキップしてください。

  2. hand resolve the conflict in the working directory, and update the index file to bring it into a state that the patch should have produced. Then run the command with the --continue option.作業ディレクトリ内の競合を手動で解決し、インデックスファイルを更新してパッチが作成されるはずの状態にします。その後、--continueオプションを付けてコマンドを実行します。

The command refuses to process new mailboxes until the current operation is finished, so if you decide to start over from scratch, run git am --abort before running the command with mailbox names.現在の操作が終了するまで、コマンドは新しいメールボックスの処理を拒否します。そのため、最初からやり直す場合は、git am --abortメールボックス名を指定してコマンドを実行する前に実行してください。

Before any patches are applied, ORIG_HEAD is set to the tip of the current branch. This is useful if you have problems with multiple commits, like running git am on the wrong branch or an error in the commits that is more easily fixed by changing the mailbox (e.g. errors in the "From:" lines).パッチが適用される前に、ORIG_HEADは現在のブランチの先端に設定されます。これは、間違ったブランチでgit amを実行したり、メールボックスを変更することでより簡単に修正できるコミットのエラー(例: "From:"行のエラー)のように、複数のコミットで問題がある場合に役立ちます。

HOOKSフック

This command can run applypatch-msg, pre-applypatch, and post-applypatch hooks. See githooks[5] for more information.このコマンドを実行することができapplypatch-msgpre-applypatchおよびpost-applypatchフック。詳細についてはgithooks [5]を参照してください。

SEE ALSO関連項目

git-apply[1].Gitは、適用する[1]

GIT

Part of the git[1] suite一部のgit [1]スイート

関連記事

スポンサーリンク

suspend 現在のシェルの実行を停止する

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る