snippetbashTip
git am — Apply patch files and create a commit. Useful when receiving commits via email. See also: `git forma
Viewed 0 times
createcommandfilesandapplycligit ampatch
Problem
How to use the
git am command: Apply patch files and create a commit. Useful when receiving commits via email. See also: git format-patch. More information: <https://git-scm.com/docs/git-am>.Solution
git am — Apply patch files and create a commit. Useful when receiving commits via email. See also: git format-patch. More information: <https://git-scm.com/docs/git-am>.Apply and commit changes following a local patch file:
git am {{path/to/file.patch}}Apply and commit changes following a remote patch file:
curl {{[-L|--location]}} {{https://example.com/file.patch}} | git amAbort the process of applying a patch file:
git am --abortApply as much of a patch file as possible, saving failed hunks to reject files:
git am --reject {{path/to/file.patch}}Code Snippets
Apply and commit changes following a local patch file
git am {{path/to/file.patch}}Apply and commit changes following a remote patch file
curl {{[-L|--location]}} {{https://example.com/file.patch}} | git amAbort the process of applying a patch file
git am --abortApply as much of a patch file as possible, saving failed hunks to reject files
git am --reject {{path/to/file.patch}}Context
tldr-pages: common/git am
Revisions (0)
No revisions yet.