Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 1 | git-apply(1) |
| 2 | ============ |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 3 | |
| 4 | NAME |
| 5 | ---- |
Björn Gustavsson | 38a3964 | 2009-11-22 20:43:42 +0100 | [diff] [blame] | 6 | git-apply - Apply a patch to files and/or to the index |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Jonas Fonseca | 353ce81 | 2005-12-31 18:37:15 +0100 | [diff] [blame] | 11 | [verse] |
Junio C Hamano | 78fb67f | 2012-05-10 14:08:29 -0700 | [diff] [blame] | 12 | 'git apply' [--stat] [--numstat] [--summary] [--check] [--index] [--3way] |
Miklos Vajna | f26c494 | 2008-12-28 00:03:57 +0100 | [diff] [blame] | 13 | [--apply] [--no-add] [--build-fake-ancestor=<file>] [-R | --reverse] |
Andrew Ruder | 0b9a9dd | 2007-04-16 01:20:40 -0500 | [diff] [blame] | 14 | [--allow-binary-replacement | --binary] [--reject] [-z] |
Štěpán Němec | 62b4698 | 2010-10-08 19:31:15 +0200 | [diff] [blame] | 15 | [-p<n>] [-C<n>] [--inaccurate-eof] [--recount] [--cached] |
Giuseppe Bilotta | 86c91f9 | 2009-08-04 13:16:49 +0200 | [diff] [blame] | 16 | [--ignore-space-change | --ignore-whitespace ] |
Štěpán Němec | 0adda93 | 2010-10-08 19:31:17 +0200 | [diff] [blame] | 17 | [--whitespace=(nowarn|warn|fix|error|error-all)] |
Štěpán Němec | 62b4698 | 2010-10-08 19:31:15 +0200 | [diff] [blame] | 18 | [--exclude=<path>] [--include=<path>] [--directory=<root>] |
Junio C Hamano | 6ecb1ee | 2008-08-25 01:05:31 -0700 | [diff] [blame] | 19 | [--verbose] [<patch>...] |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 20 | |
| 21 | DESCRIPTION |
| 22 | ----------- |
Björn Gustavsson | 38a3964 | 2009-11-22 20:43:42 +0100 | [diff] [blame] | 23 | Reads the supplied diff output (i.e. "a patch") and applies it to files. |
| 24 | With the `--index` option the patch is also applied to the index, and |
Michał Kiedrowicz | 964498e | 2011-03-03 10:28:30 +0100 | [diff] [blame] | 25 | with the `--cached` option the patch is only applied to the index. |
Björn Gustavsson | 38a3964 | 2009-11-22 20:43:42 +0100 | [diff] [blame] | 26 | Without these options, the command applies the patch only to files, |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 27 | and does not require them to be in a Git repository. |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 28 | |
Brad King | 08b2982 | 2010-08-03 14:41:50 -0400 | [diff] [blame] | 29 | This command applies the patch but does not create a commit. Use |
| 30 | linkgit:git-am[1] to create commits from patches generated by |
| 31 | linkgit:git-format-patch[1] and/or received by email. |
| 32 | |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 33 | OPTIONS |
| 34 | ------- |
Junio C Hamano | 12dd6e8 | 2005-07-13 20:28:55 -0700 | [diff] [blame] | 35 | <patch>...:: |
David J. Mellor | 1d035f8 | 2009-03-01 22:42:44 -0800 | [diff] [blame] | 36 | The files to read the patch from. '-' can be used to read |
Junio C Hamano | 12dd6e8 | 2005-07-13 20:28:55 -0700 | [diff] [blame] | 37 | from the standard input. |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 38 | |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 39 | --stat:: |
| 40 | Instead of applying the patch, output diffstat for the |
Junio C Hamano | 12dd6e8 | 2005-07-13 20:28:55 -0700 | [diff] [blame] | 41 | input. Turns off "apply". |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 42 | |
Junio C Hamano | 7d8b7c2 | 2005-10-28 02:43:31 -0700 | [diff] [blame] | 43 | --numstat:: |
Björn Gustavsson | f9821e2 | 2009-11-22 20:43:53 +0100 | [diff] [blame] | 44 | Similar to `--stat`, but shows the number of added and |
David J. Mellor | 1d035f8 | 2009-03-01 22:42:44 -0800 | [diff] [blame] | 45 | deleted lines in decimal notation and the pathname without |
Junio C Hamano | 2f89543 | 2006-12-26 00:15:26 -0800 | [diff] [blame] | 46 | abbreviation, to make it more machine friendly. For |
| 47 | binary files, outputs two `-` instead of saying |
| 48 | `0 0`. Turns off "apply". |
Junio C Hamano | 7d8b7c2 | 2005-10-28 02:43:31 -0700 | [diff] [blame] | 49 | |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 50 | --summary:: |
| 51 | Instead of applying the patch, output a condensed |
| 52 | summary of information obtained from git diff extended |
| 53 | headers, such as creations, renames and mode changes. |
Junio C Hamano | 12dd6e8 | 2005-07-13 20:28:55 -0700 | [diff] [blame] | 54 | Turns off "apply". |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 55 | |
| 56 | --check:: |
| 57 | Instead of applying the patch, see if the patch is |
Björn Gustavsson | c34ec65 | 2009-11-22 20:53:29 +0100 | [diff] [blame] | 58 | applicable to the current working tree and/or the index |
Junio C Hamano | 12dd6e8 | 2005-07-13 20:28:55 -0700 | [diff] [blame] | 59 | file and detects errors. Turns off "apply". |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 60 | |
| 61 | --index:: |
Björn Gustavsson | f9821e2 | 2009-11-22 20:43:53 +0100 | [diff] [blame] | 62 | When `--check` is in effect, or when applying the patch |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 63 | (which is the default when none of the options that |
| 64 | disables it is in effect), make sure the patch is |
| 65 | applicable to what the current index file records. If |
Björn Gustavsson | c34ec65 | 2009-11-22 20:53:29 +0100 | [diff] [blame] | 66 | the file to be patched in the working tree is not |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 67 | up-to-date, it is flagged as an error. This flag also |
| 68 | causes the index file to be updated. |
| 69 | |
Jonas Fonseca | 5684ed6 | 2006-08-25 02:56:55 +0200 | [diff] [blame] | 70 | --cached:: |
David J. Mellor | 1d035f8 | 2009-03-01 22:42:44 -0800 | [diff] [blame] | 71 | Apply a patch without touching the working tree. Instead take the |
| 72 | cached data, apply the patch, and store the result in the index |
Björn Gustavsson | f9821e2 | 2009-11-22 20:43:53 +0100 | [diff] [blame] | 73 | without using the working tree. This implies `--index`. |
Jonas Fonseca | 5684ed6 | 2006-08-25 02:56:55 +0200 | [diff] [blame] | 74 | |
Junio C Hamano | 78fb67f | 2012-05-10 14:08:29 -0700 | [diff] [blame] | 75 | -3:: |
| 76 | --3way:: |
| 77 | When the patch does not apply cleanly, fall back on 3-way merge if |
| 78 | the patch records the identity of blobs it is supposed to apply to, |
| 79 | and we have those blobs available locally, possibly leaving the |
| 80 | conflict markers in the files in the working tree for the user to |
| 81 | resolve. This option implies the `--index` option, and is incompatible |
| 82 | with the `--reject` and the `--cached` options. |
| 83 | |
Miklos Vajna | f26c494 | 2008-12-28 00:03:57 +0100 | [diff] [blame] | 84 | --build-fake-ancestor=<file>:: |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 85 | Newer 'git diff' output has embedded 'index information' |
Junio C Hamano | d88156e | 2005-10-14 21:56:46 -0700 | [diff] [blame] | 86 | for each blob to help identify the original version that |
| 87 | the patch applies to. When this flag is given, and if |
David J. Mellor | 1d035f8 | 2009-03-01 22:42:44 -0800 | [diff] [blame] | 88 | the original versions of the blobs are available locally, |
Johannes Schindelin | 7a98869 | 2007-09-17 23:34:06 +0100 | [diff] [blame] | 89 | builds a temporary index containing those blobs. |
| 90 | + |
| 91 | When a pure mode change is encountered (which has no index information), |
| 92 | the information is read from the current index instead. |
Junio C Hamano | d88156e | 2005-10-14 21:56:46 -0700 | [diff] [blame] | 93 | |
Stephan Beyer | 3240240 | 2008-06-08 03:36:09 +0200 | [diff] [blame] | 94 | -R:: |
| 95 | --reverse:: |
Jonas Fonseca | 5684ed6 | 2006-08-25 02:56:55 +0200 | [diff] [blame] | 96 | Apply the patch in reverse. |
| 97 | |
| 98 | --reject:: |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 99 | For atomicity, 'git apply' by default fails the whole patch and |
Jonas Fonseca | 5684ed6 | 2006-08-25 02:56:55 +0200 | [diff] [blame] | 100 | does not touch the working tree when some of the hunks |
| 101 | do not apply. This option makes it apply |
Junio C Hamano | b32d37a | 2006-08-27 17:51:05 -0700 | [diff] [blame] | 102 | the parts of the patch that are applicable, and leave the |
Junio C Hamano | 8938045 | 2006-08-27 15:53:20 -0700 | [diff] [blame] | 103 | rejected hunks in corresponding *.rej files. |
Jonas Fonseca | 5684ed6 | 2006-08-25 02:56:55 +0200 | [diff] [blame] | 104 | |
Junio C Hamano | d88156e | 2005-10-14 21:56:46 -0700 | [diff] [blame] | 105 | -z:: |
Björn Gustavsson | 64485b4 | 2009-11-22 20:43:20 +0100 | [diff] [blame] | 106 | When `--numstat` has been given, do not munge pathnames, |
| 107 | but use a NUL-terminated machine-readable format. |
| 108 | + |
| 109 | Without this option, each pathname output will have TAB, LF, double quotes, |
| 110 | and backslash characters replaced with `\t`, `\n`, `\"`, and `\\`, |
| 111 | respectively, and the pathname will be enclosed in double quotes if |
| 112 | any of those replacements occurred. |
Junio C Hamano | d88156e | 2005-10-14 21:56:46 -0700 | [diff] [blame] | 113 | |
Daniel Barkalow | e36f8b6 | 2006-01-31 00:36:24 -0500 | [diff] [blame] | 114 | -p<n>:: |
| 115 | Remove <n> leading slashes from traditional diff paths. The |
| 116 | default is 1. |
| 117 | |
Eric W. Biederman | 4749588 | 2006-04-10 03:33:06 -0600 | [diff] [blame] | 118 | -C<n>:: |
| 119 | Ensure at least <n> lines of surrounding context match before |
| 120 | and after each change. When fewer lines of surrounding |
Jonas Fonseca | 74237d6 | 2006-06-07 20:32:33 +0200 | [diff] [blame] | 121 | context exist they all must match. By default no context is |
Eric W. Biederman | 4749588 | 2006-04-10 03:33:06 -0600 | [diff] [blame] | 122 | ever ignored. |
| 123 | |
Jonas Fonseca | f58bb6f | 2006-09-17 12:55:38 +0200 | [diff] [blame] | 124 | --unidiff-zero:: |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 125 | By default, 'git apply' expects that the patch being |
Jonas Fonseca | f58bb6f | 2006-09-17 12:55:38 +0200 | [diff] [blame] | 126 | applied is a unified diff with at least one line of context. |
| 127 | This provides good safety measures, but breaks down when |
Björn Gustavsson | f9821e2 | 2009-11-22 20:43:53 +0100 | [diff] [blame] | 128 | applying a diff generated with `--unified=0`. To bypass these |
| 129 | checks use `--unidiff-zero`. |
Jonas Fonseca | f58bb6f | 2006-09-17 12:55:38 +0200 | [diff] [blame] | 130 | + |
David J. Mellor | 1d035f8 | 2009-03-01 22:42:44 -0800 | [diff] [blame] | 131 | Note, for the reasons stated above usage of context-free patches is |
Jonas Fonseca | f58bb6f | 2006-09-17 12:55:38 +0200 | [diff] [blame] | 132 | discouraged. |
| 133 | |
Junio C Hamano | 12dd6e8 | 2005-07-13 20:28:55 -0700 | [diff] [blame] | 134 | --apply:: |
Jonas Fonseca | 5684ed6 | 2006-08-25 02:56:55 +0200 | [diff] [blame] | 135 | If you use any of the options marked "Turns off |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 136 | 'apply'" above, 'git apply' reads and outputs the |
David J. Mellor | 1d035f8 | 2009-03-01 22:42:44 -0800 | [diff] [blame] | 137 | requested information without actually applying the |
Junio C Hamano | 12dd6e8 | 2005-07-13 20:28:55 -0700 | [diff] [blame] | 138 | patch. Give this flag after those flags to also apply |
| 139 | the patch. |
| 140 | |
Junio C Hamano | e433705 | 2005-11-09 20:53:54 -0800 | [diff] [blame] | 141 | --no-add:: |
| 142 | When applying a patch, ignore additions made by the |
Wincent Colaiuta | 71a9883 | 2007-12-12 09:14:20 +0100 | [diff] [blame] | 143 | patch. This can be used to extract the common part between |
Jonathan Nieder | 2fd02c9 | 2008-07-03 00:55:07 -0500 | [diff] [blame] | 144 | two files by first running 'diff' on them and applying |
Junio C Hamano | e433705 | 2005-11-09 20:53:54 -0800 | [diff] [blame] | 145 | the result with this option, which would apply the |
David J. Mellor | 1d035f8 | 2009-03-01 22:42:44 -0800 | [diff] [blame] | 146 | deletion part but not the addition part. |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 147 | |
Stephan Beyer | 3240240 | 2008-06-08 03:36:09 +0200 | [diff] [blame] | 148 | --allow-binary-replacement:: |
| 149 | --binary:: |
Junio C Hamano | 2b6eef9 | 2006-09-06 22:45:21 -0700 | [diff] [blame] | 150 | Historically we did not allow binary patch applied |
| 151 | without an explicit permission from the user, and this |
| 152 | flag was the way to do so. Currently we always allow binary |
| 153 | patch application, so this is a no-op. |
Junio C Hamano | 27dedf0 | 2005-11-16 21:32:44 -0800 | [diff] [blame] | 154 | |
Jonas Fonseca | 5684ed6 | 2006-08-25 02:56:55 +0200 | [diff] [blame] | 155 | --exclude=<path-pattern>:: |
| 156 | Don't apply changes to files matching the given path pattern. This can |
| 157 | be useful when importing patchsets, where you want to exclude certain |
| 158 | files or directories. |
| 159 | |
Junio C Hamano | 6ecb1ee | 2008-08-25 01:05:31 -0700 | [diff] [blame] | 160 | --include=<path-pattern>:: |
| 161 | Apply changes to files matching the given path pattern. This can |
| 162 | be useful when importing patchsets, where you want to include certain |
| 163 | files or directories. |
| 164 | + |
Björn Gustavsson | f9821e2 | 2009-11-22 20:43:53 +0100 | [diff] [blame] | 165 | When `--exclude` and `--include` patterns are used, they are examined in the |
Junio C Hamano | 6ecb1ee | 2008-08-25 01:05:31 -0700 | [diff] [blame] | 166 | order they appear on the command line, and the first match determines if a |
| 167 | patch to each path is used. A patch to a path that does not match any |
| 168 | include/exclude pattern is used by default if there is no include pattern |
| 169 | on the command line, and ignored if there is any include pattern. |
| 170 | |
Giuseppe Bilotta | 86c91f9 | 2009-08-04 13:16:49 +0200 | [diff] [blame] | 171 | --ignore-space-change:: |
| 172 | --ignore-whitespace:: |
| 173 | When applying a patch, ignore changes in whitespace in context |
| 174 | lines if necessary. |
| 175 | Context lines will preserve their whitespace, and they will not |
| 176 | undergo whitespace fixing regardless of the value of the |
| 177 | `--whitespace` option. New lines will still be fixed, though. |
| 178 | |
Junio C Hamano | 91af7ae | 2007-11-24 11:57:41 -0800 | [diff] [blame] | 179 | --whitespace=<action>:: |
| 180 | When applying a patch, detect a new or modified line that has |
| 181 | whitespace errors. What are considered whitespace errors is |
| 182 | controlled by `core.whitespace` configuration. By default, |
| 183 | trailing whitespaces (including lines that solely consist of |
| 184 | whitespaces) and a space character that is immediately followed |
| 185 | by a tab character inside the initial indent of the line are |
| 186 | considered whitespace errors. |
| 187 | + |
| 188 | By default, the command outputs warning messages but applies the patch. |
Danijel Tasov | eb006cc | 2009-02-28 21:03:54 +0100 | [diff] [blame] | 189 | When `git-apply` is used for statistics and not applying a |
Junio C Hamano | 91af7ae | 2007-11-24 11:57:41 -0800 | [diff] [blame] | 190 | patch, it defaults to `nowarn`. |
| 191 | + |
David J. Mellor | 1d035f8 | 2009-03-01 22:42:44 -0800 | [diff] [blame] | 192 | You can use different `<action>` values to control this |
Junio C Hamano | 91af7ae | 2007-11-24 11:57:41 -0800 | [diff] [blame] | 193 | behavior: |
Junio C Hamano | 8273c79 | 2006-03-02 00:45:48 -0800 | [diff] [blame] | 194 | + |
| 195 | * `nowarn` turns off the trailing whitespace warning. |
| 196 | * `warn` outputs warnings for a few such errors, but applies the |
Junio C Hamano | 91af7ae | 2007-11-24 11:57:41 -0800 | [diff] [blame] | 197 | patch as-is (default). |
| 198 | * `fix` outputs warnings for a few such errors, and applies the |
| 199 | patch after fixing them (`strip` is a synonym --- the tool |
David J. Mellor | 1d035f8 | 2009-03-01 22:42:44 -0800 | [diff] [blame] | 200 | used to consider only trailing whitespace characters as errors, and the |
Thomas Ackermann | 2de9b71 | 2013-01-21 20:17:53 +0100 | [diff] [blame] | 201 | fix involved 'stripping' them, but modern Gits do more). |
Junio C Hamano | 8273c79 | 2006-03-02 00:45:48 -0800 | [diff] [blame] | 202 | * `error` outputs warnings for a few such errors, and refuses |
| 203 | to apply the patch. |
| 204 | * `error-all` is similar to `error` but shows all errors. |
Junio C Hamano | 8273c79 | 2006-03-02 00:45:48 -0800 | [diff] [blame] | 205 | |
Petr Baudis | f847c07 | 2006-11-18 06:05:11 +0100 | [diff] [blame] | 206 | --inaccurate-eof:: |
Jonathan Nieder | 0979c10 | 2008-07-03 00:37:18 -0500 | [diff] [blame] | 207 | Under certain circumstances, some versions of 'diff' do not correctly |
Jonas Fonseca | 5684ed6 | 2006-08-25 02:56:55 +0200 | [diff] [blame] | 208 | detect a missing new-line at the end of the file. As a result, patches |
Jonathan Nieder | 0979c10 | 2008-07-03 00:37:18 -0500 | [diff] [blame] | 209 | created by such 'diff' programs do not record incomplete lines |
Jonas Fonseca | 5684ed6 | 2006-08-25 02:56:55 +0200 | [diff] [blame] | 210 | correctly. This option adds support for applying such patches by |
| 211 | working around this bug. |
| 212 | |
Stephan Beyer | 3240240 | 2008-06-08 03:36:09 +0200 | [diff] [blame] | 213 | -v:: |
| 214 | --verbose:: |
Jonas Fonseca | 5684ed6 | 2006-08-25 02:56:55 +0200 | [diff] [blame] | 215 | Report progress to stderr. By default, only a message about the |
| 216 | current patch being applied will be printed. This option will cause |
| 217 | additional information to be reported. |
Junio C Hamano | 8273c79 | 2006-03-02 00:45:48 -0800 | [diff] [blame] | 218 | |
Johannes Schindelin | c14b9d1 | 2008-06-27 18:43:09 +0100 | [diff] [blame] | 219 | --recount:: |
| 220 | Do not trust the line counts in the hunk headers, but infer them |
| 221 | by inspecting the patch (e.g. after editing the patch without |
| 222 | adjusting the hunk headers appropriately). |
| 223 | |
Junio C Hamano | f556388 | 2008-07-06 18:36:01 -0700 | [diff] [blame] | 224 | --directory=<root>:: |
David J. Mellor | 1d035f8 | 2009-03-01 22:42:44 -0800 | [diff] [blame] | 225 | Prepend <root> to all filenames. If a "-p" argument was also passed, |
Johannes Schindelin | c4730f3 | 2008-07-01 00:44:47 +0100 | [diff] [blame] | 226 | it is applied before prepending the new root. |
Junio C Hamano | f556388 | 2008-07-06 18:36:01 -0700 | [diff] [blame] | 227 | + |
| 228 | For example, a patch that talks about updating `a/git-gui.sh` to `b/git-gui.sh` |
| 229 | can be applied to the file in the working tree `modules/git-gui/git-gui.sh` by |
| 230 | running `git apply --directory=modules/git-gui`. |
Johannes Schindelin | c4730f3 | 2008-07-01 00:44:47 +0100 | [diff] [blame] | 231 | |
Junio C Hamano | 8273c79 | 2006-03-02 00:45:48 -0800 | [diff] [blame] | 232 | Configuration |
| 233 | ------------- |
| 234 | |
Giuseppe Bilotta | 86c91f9 | 2009-08-04 13:16:49 +0200 | [diff] [blame] | 235 | apply.ignorewhitespace:: |
| 236 | Set to 'change' if you want changes in whitespace to be ignored by default. |
| 237 | Set to one of: no, none, never, false if you want changes in |
| 238 | whitespace to be significant. |
Junio C Hamano | 8273c79 | 2006-03-02 00:45:48 -0800 | [diff] [blame] | 239 | apply.whitespace:: |
| 240 | When no `--whitespace` flag is given from the command |
| 241 | line, this configuration item is used as the default. |
| 242 | |
Sven Verdoolaege | e06c5a6 | 2007-08-15 19:22:09 +0200 | [diff] [blame] | 243 | Submodules |
| 244 | ---------- |
Thomas Rast | 0b444cd | 2010-01-10 00:33:00 +0100 | [diff] [blame] | 245 | If the patch contains any changes to submodules then 'git apply' |
Sven Verdoolaege | e06c5a6 | 2007-08-15 19:22:09 +0200 | [diff] [blame] | 246 | treats these changes as follows. |
| 247 | |
Björn Gustavsson | f9821e2 | 2009-11-22 20:43:53 +0100 | [diff] [blame] | 248 | If `--index` is specified (explicitly or implicitly), then the submodule |
Sven Verdoolaege | e06c5a6 | 2007-08-15 19:22:09 +0200 | [diff] [blame] | 249 | commits must match the index exactly for the patch to apply. If any |
| 250 | of the submodules are checked-out, then these check-outs are completely |
| 251 | ignored, i.e., they are not required to be up-to-date or clean and they |
| 252 | are not updated. |
| 253 | |
Björn Gustavsson | f9821e2 | 2009-11-22 20:43:53 +0100 | [diff] [blame] | 254 | If `--index` is not specified, then the submodule commits in the patch |
David J. Mellor | 1d035f8 | 2009-03-01 22:42:44 -0800 | [diff] [blame] | 255 | are ignored and only the absence or presence of the corresponding |
Sven Verdoolaege | e06c5a6 | 2007-08-15 19:22:09 +0200 | [diff] [blame] | 256 | subdirectory is checked and (if possible) updated. |
Junio C Hamano | 8273c79 | 2006-03-02 00:45:48 -0800 | [diff] [blame] | 257 | |
Brad King | 08b2982 | 2010-08-03 14:41:50 -0400 | [diff] [blame] | 258 | SEE ALSO |
| 259 | -------- |
| 260 | linkgit:git-am[1]. |
| 261 | |
Junio C Hamano | d0587fd | 2005-06-22 02:30:17 -0700 | [diff] [blame] | 262 | GIT |
| 263 | --- |
Christian Couder | 9e1f0a8 | 2008-06-06 09:07:32 +0200 | [diff] [blame] | 264 | Part of the linkgit:git[1] suite |