From daa21a60a3650f1473929c9e5e75f4f27ed4b763 Mon Sep 17 00:00:00 2001 From: Axel Navarro Date: Tue, 11 Aug 2020 20:33:53 -0300 Subject: [PATCH] git-apply: add page (#4252) * git-apply: add page * Apply suggestions from code review Co-authored-by: Starbeamrainbowlabs Co-authored-by: Starbeamrainbowlabs --- pages/common/git-apply.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pages/common/git-apply.md diff --git a/pages/common/git-apply.md b/pages/common/git-apply.md new file mode 100644 index 000000000..5b5757916 --- /dev/null +++ b/pages/common/git-apply.md @@ -0,0 +1,28 @@ +# git apply + +> Apply a patch to files and/or to the index. +> More information: . + +- Print messages about the patched files: + +`git apply --verbose {{path/to/file}}` + +- Apply and add the patched files to the index: + +`git apply --index {{path/to/file}}` + +- Apply a remote patch file: + +`curl {{https://example.com/file.patch}} | git apply` + +- Output diffstat for the input and apply the patch: + +`git apply --stat --apply {{path/to/file}}` + +- Apply the patch in reverse: + +`git apply --reverse {{path/to/file}}` + +- Store the patch result in the index without modifying the working tree: + +`git apply --cache {{path/to/file}}`