Home Explore Blog CI



git

3rd chunk of `Documentation/git-am.adoc`
5fbc81c5f9735060682fa17b924e7e10700cccd42d40e0610000000100000866

--skip::
	Skip the current patch.  This is only meaningful when
	restarting an aborted patch.

-S[<keyid>]::
--gpg-sign[=<keyid>]::
--no-gpg-sign::
	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. `--no-gpg-sign` is useful to
	countermand both `commit.gpgSign` configuration variable, and
	earlier `--gpg-sign`.

--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>::
	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'.

--abort::
	Restore the original branch and abort the patching operation.
	Revert the contents of files involved in the am operation to their
	pre-am state.

--quit::
	Abort the patching operation but keep HEAD and the index
	untouched.

--retry::
	Try to apply the last conflicting patch again. This is generally
	only useful for passing extra options to the retry attempt
	(e.g., `--3way`), since otherwise you'll just see the same
	failure again.

--show-current-patch[=(diff|raw)]::
	Show the message at which `git am` has stopped due to
	conflicts.  If `raw` is specified, show the raw contents of
	the e-mail message; if `diff`, show the diff portion only.
	Defaults to `raw`.

--allow-empty::
	After a patch failure on an input e-mail message lacking a patch,
	create an empty commit with the contents of the e-mail message
	as its log message.

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>]".

Title: Git Am Commands and Options
Summary
The git-am command provides various options for managing patches, including skipping, resolving, and aborting patches, as well as customizing commit messages and handling failures, allowing users to control the patch application process.