summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64485b4)
raw | patch | inline | side by side (parent: 64485b4)
author | Björn Gustavsson <bgustavsson@gmail.com> | |
Sun, 22 Nov 2009 19:43:42 +0000 (20:43 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 22 Nov 2009 20:08:04 +0000 (12:08 -0800) |
The documentation for 'git apply' talks about applying a
patch/diff to the index and to the working tree, which seems
to imply that it will not work outside a git repository.
Actually 'git patch' works outside a repository (which can
be useful especially for applying binary or rename patches that
the standard "patch" utility cannot handle), so the documentation
should mention it.
Thanks to Junio for suggesting better wording.
Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
patch/diff to the index and to the working tree, which seems
to imply that it will not work outside a git repository.
Actually 'git patch' works outside a repository (which can
be useful especially for applying binary or rename patches that
the standard "patch" utility cannot handle), so the documentation
should mention it.
Thanks to Junio for suggesting better wording.
Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-apply.txt | patch | blob | history |
index 0156ca9112255d50f94680f6b72b1e8395f37b3e..0c55ca92e0d74cd701e6c31ff541f71511c824cd 100644 (file)
NAME
----
-git-apply - Apply a patch on a git index file and/or a working tree
+git-apply - Apply a patch to files and/or to the index
SYNOPSIS
DESCRIPTION
-----------
-Reads supplied 'diff' output and applies it on a git index file
-and a work tree.
+Reads the supplied diff output (i.e. "a patch") and applies it to files.
+With the `--index` option the patch is also applied to the index, and
+with the `--cache` option the patch is only applied to the index.
+Without these options, the command applies the patch only to files,
+and does not require them to be in a git repository.
OPTIONS
-------