diff --git a/pages/common/git-am.md b/pages/common/git-am.md index 4b170737a..d22019a92 100644 --- a/pages/common/git-am.md +++ b/pages/common/git-am.md @@ -1,13 +1,17 @@ # git am -> Apply patch files. Useful when receiving commits via email. +> Apply patch files and create a commit. Useful when receiving commits via email. > See also `git format-patch`, which can generate patch files. > More information: . -- Apply a patch file: +- 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 {{https://example.com/file.patch}} | git apply` + - Abort the process of applying a patch file: `git am --abort` diff --git a/pages/common/git-apply.md b/pages/common/git-apply.md index 5b5757916..9687569ed 100644 --- a/pages/common/git-apply.md +++ b/pages/common/git-apply.md @@ -1,6 +1,7 @@ # git apply -> Apply a patch to files and/or to the index. +> Apply a patch to files and/or to the index without creating a commit. +> See also `git am`, which applies a patch and also creates a commit. > More information: . - Print messages about the patched files: @@ -13,7 +14,7 @@ - Apply a remote patch file: -`curl {{https://example.com/file.patch}} | git apply` +`curl -L {{https://example.com/file.patch}} | git apply` - Output diffstat for the input and apply the patch: