<div class="content">\r
<pre><tt>$ git checkout mybranch\r
$ echo "Work, work, work" >>hello\r
-$ git commit -m 'Some work.' -i hello</tt></pre>\r
+$ git commit -m "Some work." -i hello</tt></pre>\r
</div></div>\r
<p>Here, we just added another line to <tt>hello</tt>, and we used a shorthand for\r
doing both <tt>git-update-index hello</tt> and <tt>git commit</tt> by just giving the\r
<div class="content">\r
<pre><tt>$ echo "Play, play, play" >>hello\r
$ echo "Lots of fun" >>example\r
-$ git commit -m 'Some fun.' -i hello example</tt></pre>\r
+$ git commit -m "Some fun." -i hello example</tt></pre>\r
</div></div>\r
<p>since the master branch is obviously in a much better mood.</p>\r
<p>Now, you've got two branches, and you decide that you want to merge the\r
<em>commit-fix</em> next, like this:</p>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>$ git merge -m 'Merge fix in diff-fix' diff-fix\r
-$ git merge -m 'Merge fix in commit-fix' commit-fix</tt></pre>\r
+<pre><tt>$ git merge -m "Merge fix in diff-fix" diff-fix\r
+$ git merge -m "Merge fix in commit-fix" commit-fix</tt></pre>\r
</div></div>\r
<p>Which would result in:</p>\r
<div class="listingblock">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 31-Oct-2007 05:56:51 UTC\r
+Last updated 03-Nov-2007 02:45:17 UTC\r
</div>\r
</div>\r
</body>\r
------------------------------------------------
$ git checkout mybranch
$ echo "Work, work, work" >>hello
-$ git commit -m 'Some work.' -i hello
+$ git commit -m "Some work." -i hello
------------------------------------------------
Here, we just added another line to `hello`, and we used a shorthand for
------------
$ echo "Play, play, play" >>hello
$ echo "Lots of fun" >>example
-$ git commit -m 'Some fun.' -i hello example
+$ git commit -m "Some fun." -i hello example
------------
since the master branch is obviously in a much better mood.
'commit-fix' next, like this:
------------
-$ git merge -m 'Merge fix in diff-fix' diff-fix
-$ git merge -m 'Merge fix in commit-fix' commit-fix
+$ git merge -m "Merge fix in diff-fix" diff-fix
+$ git merge -m "Merge fix in commit-fix" commit-fix
------------
Which would result in:
-The output format from "git-diff-index", "git-diff-tree" and
-"git-diff-files" are very similar.
+The output format from "git-diff-index", "git-diff-tree",
+"git-diff-files" and "git diff --raw" are very similar.
These commands all compare two sets of things; what is
compared differs:
diff format for merges
----------------------
-"git-diff-tree" and "git-diff-files" can take '-c' or '--cc' option
+"git-diff-tree", "git-diff-files" and "git-diff --raw"
+can take '-c' or '--cc' option
to generate diff output also for merge commits. The output differs
from the format described above in the following way:
--------------------------
When "git-diff-index", "git-diff-tree", or "git-diff-files" are run
-with a '-p' option, they do not produce the output described above;
-instead they produce a patch file. You can customize the creation
-of such patches via the GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS
-environment variables.
+with a '-p' option, or "git diff" without the '--raw' option, they
+do not produce the output described above; instead they produce a
+patch file. You can customize the creation of such patches via the
+GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.
What the -p option produces is slightly different from the traditional
diff format.
combined diff format
--------------------
-git-diff-tree and git-diff-files can take '-c' or '--cc' option
-to produce 'combined diff', which looks like this:
+"git-diff-tree", "git-diff-files" and "git-diff" can take '-c' or
+'--cc' option to produce 'combined diff', which looks like this:
------------
diff --combined describe.c
$ cd frotz\r
$ git-init\r
$ git add . <b>(1)</b>\r
-$ git commit -m 'import of frotz source tree.'\r
+$ git commit -m "import of frotz source tree."\r
$ git tag v2.43 <b>(2)</b></tt></pre>\r
</div></div>\r
<ol>\r
$ git checkout maint\r
$ git cherry-pick master~4 <b>(9)</b>\r
$ compile/test\r
-$ git tag -s -m 'GIT 0.99.9x' v0.99.9x <b>(10)</b>\r
+$ git tag -s -m "GIT 0.99.9x" v0.99.9x <b>(10)</b>\r
$ git fetch ko && git show-branch master maint 'tags/ko-*' <b>(11)</b>\r
$ git push ko <b>(12)</b>\r
$ git push ko v0.99.9x <b>(13)</b></tt></pre>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 19-Jul-2007 02:10:09 UTC\r
+Last updated 03-Nov-2007 02:45:18 UTC\r
</div>\r
</div>\r
</body>\r
$ cd frotz
$ git-init
$ git add . <1>
-$ git commit -m 'import of frotz source tree.'
+$ git commit -m "import of frotz source tree."
$ git tag v2.43 <2>
------------
+
$ git checkout maint
$ git cherry-pick master~4 <9>
$ compile/test
-$ git tag -s -m 'GIT 0.99.9x' v0.99.9x <10>
+$ git tag -s -m "GIT 0.99.9x" v0.99.9x <10>
$ git fetch ko && git show-branch master maint 'tags/ko-*' <11>
$ git push ko <12>
$ git push ko v0.99.9x <13>
</p>\r
</dd>\r
<dt>\r
--n\r
+-n, --dry-run\r
</dt>\r
<dd>\r
<p>\r
</p>\r
</dd>\r
<dt>\r
--v\r
+-v, --verbose\r
</dt>\r
<dd>\r
<p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 29-Aug-2007 07:30:53 UTC\r
+Last updated 03-Nov-2007 02:45:07 UTC\r
</div>\r
</div>\r
</body>\r
and `dir/file2`) can be given to add all files in the
directory, recursively.
--n::
+-n, \--dry-run::
Don't actually add the file(s), just show if they exist.
--v::
+-v, \--verbose::
Be verbose.
-f::
</p>\r
</dd>\r
<dt>\r
--v\r
+-v, --verbose\r
</dt>\r
<dd>\r
<p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 03-Oct-2007 12:03:44 UTC\r
+Last updated 03-Nov-2007 02:45:07 UTC\r
</div>\r
</div>\r
</body>\r
-a::
List both remote-tracking branches and local branches.
--v::
+-v, --verbose::
Show sha1 and commit subject line for each head.
--abbrev=<length>::
</div>\r
<h2>Output format</h2>\r
<div class="sectionbody">\r
-<p>The output format from "git-diff-index", "git-diff-tree" and\r
-"git-diff-files" are very similar.</p>\r
+<p>The output format from "git-diff-index", "git-diff-tree",\r
+"git-diff-files" and "git diff --raw" are very similar.</p>\r
<p>These commands all compare two sets of things; what is\r
compared differs:</p>\r
<dl>\r
</div>\r
<h2>diff format for merges</h2>\r
<div class="sectionbody">\r
-<p>"git-diff-tree" and "git-diff-files" can take <em>-c</em> or <em>--cc</em> option\r
+<p>"git-diff-tree", "git-diff-files" and "git-diff --raw"\r
+can take <em>-c</em> or <em>--cc</em> option\r
to generate diff output also for merge commits. The output differs\r
from the format described above in the following way:</p>\r
<ol>\r
<h2>Generating patches with -p</h2>\r
<div class="sectionbody">\r
<p>When "git-diff-index", "git-diff-tree", or "git-diff-files" are run\r
-with a <em>-p</em> option, they do not produce the output described above;\r
-instead they produce a patch file. You can customize the creation\r
-of such patches via the GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS\r
-environment variables.</p>\r
+with a <em>-p</em> option, or "git diff" without the <em>--raw</em> option, they\r
+do not produce the output described above; instead they produce a\r
+patch file. You can customize the creation of such patches via the\r
+GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.</p>\r
<p>What the -p option produces is slightly different from the traditional\r
diff format.</p>\r
<ol>\r
</div>\r
<h2>combined diff format</h2>\r
<div class="sectionbody">\r
-<p>git-diff-tree and git-diff-files can take <em>-c</em> or <em>--cc</em> option\r
-to produce <em>combined diff</em>, which looks like this:</p>\r
+<p>"git-diff-tree", "git-diff-files" and "git-diff" can take <em>-c</em> or\r
+<em>--cc</em> option to produce <em>combined diff</em>, which looks like this:</p>\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt>diff --combined describe.c\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 03-Oct-2007 12:03:44 UTC\r
+Last updated 03-Nov-2007 02:45:08 UTC\r
</div>\r
</div>\r
</body>\r
</div>\r
<h2>Output format</h2>\r
<div class="sectionbody">\r
-<p>The output format from "git-diff-index", "git-diff-tree" and\r
-"git-diff-files" are very similar.</p>\r
+<p>The output format from "git-diff-index", "git-diff-tree",\r
+"git-diff-files" and "git diff --raw" are very similar.</p>\r
<p>These commands all compare two sets of things; what is\r
compared differs:</p>\r
<dl>\r
</div>\r
<h2>diff format for merges</h2>\r
<div class="sectionbody">\r
-<p>"git-diff-tree" and "git-diff-files" can take <em>-c</em> or <em>--cc</em> option\r
+<p>"git-diff-tree", "git-diff-files" and "git-diff --raw"\r
+can take <em>-c</em> or <em>--cc</em> option\r
to generate diff output also for merge commits. The output differs\r
from the format described above in the following way:</p>\r
<ol>\r
<h2>Generating patches with -p</h2>\r
<div class="sectionbody">\r
<p>When "git-diff-index", "git-diff-tree", or "git-diff-files" are run\r
-with a <em>-p</em> option, they do not produce the output described above;\r
-instead they produce a patch file. You can customize the creation\r
-of such patches via the GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS\r
-environment variables.</p>\r
+with a <em>-p</em> option, or "git diff" without the <em>--raw</em> option, they\r
+do not produce the output described above; instead they produce a\r
+patch file. You can customize the creation of such patches via the\r
+GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.</p>\r
<p>What the -p option produces is slightly different from the traditional\r
diff format.</p>\r
<ol>\r
</div>\r
<h2>combined diff format</h2>\r
<div class="sectionbody">\r
-<p>git-diff-tree and git-diff-files can take <em>-c</em> or <em>--cc</em> option\r
-to produce <em>combined diff</em>, which looks like this:</p>\r
+<p>"git-diff-tree", "git-diff-files" and "git-diff" can take <em>-c</em> or\r
+<em>--cc</em> option to produce <em>combined diff</em>, which looks like this:</p>\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt>diff --combined describe.c\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 03-Oct-2007 12:03:46 UTC\r
+Last updated 03-Nov-2007 02:45:09 UTC\r
</div>\r
</div>\r
</body>\r
</div>\r
<h2>Output format</h2>\r
<div class="sectionbody">\r
-<p>The output format from "git-diff-index", "git-diff-tree" and\r
-"git-diff-files" are very similar.</p>\r
+<p>The output format from "git-diff-index", "git-diff-tree",\r
+"git-diff-files" and "git diff --raw" are very similar.</p>\r
<p>These commands all compare two sets of things; what is\r
compared differs:</p>\r
<dl>\r
</div>\r
<h2>diff format for merges</h2>\r
<div class="sectionbody">\r
-<p>"git-diff-tree" and "git-diff-files" can take <em>-c</em> or <em>--cc</em> option\r
+<p>"git-diff-tree", "git-diff-files" and "git-diff --raw"\r
+can take <em>-c</em> or <em>--cc</em> option\r
to generate diff output also for merge commits. The output differs\r
from the format described above in the following way:</p>\r
<ol>\r
<h2>Generating patches with -p</h2>\r
<div class="sectionbody">\r
<p>When "git-diff-index", "git-diff-tree", or "git-diff-files" are run\r
-with a <em>-p</em> option, they do not produce the output described above;\r
-instead they produce a patch file. You can customize the creation\r
-of such patches via the GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS\r
-environment variables.</p>\r
+with a <em>-p</em> option, or "git diff" without the <em>--raw</em> option, they\r
+do not produce the output described above; instead they produce a\r
+patch file. You can customize the creation of such patches via the\r
+GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.</p>\r
<p>What the -p option produces is slightly different from the traditional\r
diff format.</p>\r
<ol>\r
</div>\r
<h2>combined diff format</h2>\r
<div class="sectionbody">\r
-<p>git-diff-tree and git-diff-files can take <em>-c</em> or <em>--cc</em> option\r
-to produce <em>combined diff</em>, which looks like this:</p>\r
+<p>"git-diff-tree", "git-diff-files" and "git-diff" can take <em>-c</em> or\r
+<em>--cc</em> option to produce <em>combined diff</em>, which looks like this:</p>\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt>diff --combined describe.c\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 03-Oct-2007 12:03:47 UTC\r
+Last updated 03-Nov-2007 02:45:11 UTC\r
</div>\r
</div>\r
</body>\r
</dd>\r
</dl>\r
</div>\r
+<h2>Output format</h2>\r
+<div class="sectionbody">\r
+<p>The output format from "git-diff-index", "git-diff-tree",\r
+"git-diff-files" and "git diff --raw" are very similar.</p>\r
+<p>These commands all compare two sets of things; what is\r
+compared differs:</p>\r
+<dl>\r
+<dt>\r
+git-diff-index <tree-ish>\r
+</dt>\r
+<dd>\r
+<p>\r
+ compares the <tree-ish> and the files on the filesystem.\r
+</p>\r
+</dd>\r
+<dt>\r
+git-diff-index --cached <tree-ish>\r
+</dt>\r
+<dd>\r
+<p>\r
+ compares the <tree-ish> and the index.\r
+</p>\r
+</dd>\r
+<dt>\r
+git-diff-tree [-r] <tree-ish-1> <tree-ish-2> [<pattern>…]\r
+</dt>\r
+<dd>\r
+<p>\r
+ compares the trees named by the two arguments.\r
+</p>\r
+</dd>\r
+<dt>\r
+git-diff-files [<pattern>…]\r
+</dt>\r
+<dd>\r
+<p>\r
+ compares the index and the files on the filesystem.\r
+</p>\r
+</dd>\r
+</dl>\r
+<p>An output line is formatted this way:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>in-place edit :100644 100644 bcd1234... 0123456... M file0\r
+copy-edit :100644 100644 abcd123... 1234567... C68 file1 file2\r
+rename-edit :100644 100644 abcd123... 1234567... R86 file1 file3\r
+create :000000 100644 0000000... 1234567... A file4\r
+delete :100644 000000 1234567... 0000000... D file5\r
+unmerged :000000 000000 0000000... 0000000... U file6</tt></pre>\r
+</div></div>\r
+<p>That is, from the left to the right:</p>\r
+<ol>\r
+<li>\r
+<p>\r
+a colon.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+mode for "src"; 000000 if creation or unmerged.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+a space.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+mode for "dst"; 000000 if deletion or unmerged.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+a space.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+sha1 for "src"; 0{40} if creation or unmerged.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+a space.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+sha1 for "dst"; 0{40} if creation, unmerged or "look at work tree".\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+a space.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+status, followed by optional "score" number.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+a tab or a NUL when <em>-z</em> option is used.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+path for "src"\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+a tab or a NUL when <em>-z</em> option is used; only exists for C or R.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+path for "dst"; only exists for C or R.\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+an LF or a NUL when <em>-z</em> option is used, to terminate the record.\r
+</p>\r
+</li>\r
+</ol>\r
+<p><sha1> is shown as all 0's if a file is new on the filesystem\r
+and it is out of sync with the index.</p>\r
+<p>Example:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>:100644 100644 5be4a4...... 000000...... M file.c</tt></pre>\r
+</div></div>\r
+<p>When <tt>-z</tt> option is not used, TAB, LF, and backslash characters\r
+in pathnames are represented as <tt>\t</tt>, <tt>\n</tt>, and <tt>\\</tt>,\r
+respectively.</p>\r
+</div>\r
+<h2>diff format for merges</h2>\r
+<div class="sectionbody">\r
+<p>"git-diff-tree", "git-diff-files" and "git-diff --raw"\r
+can take <em>-c</em> or <em>--cc</em> option\r
+to generate diff output also for merge commits. The output differs\r
+from the format described above in the following way:</p>\r
+<ol>\r
+<li>\r
+<p>\r
+there is a colon for each parent\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+there are more "src" modes and "src" sha1\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+status is concatenated status characters for each parent\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+no optional "score" number\r
+</p>\r
+</li>\r
+<li>\r
+<p>\r
+single path, only for "dst"\r
+</p>\r
+</li>\r
+</ol>\r
+<p>Example:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>::100644 100644 100644 fabadb8... cc95eb0... 4866510... MM describe.c</tt></pre>\r
+</div></div>\r
+<p>Note that <em>combined diff</em> lists only files which were modified from\r
+all parents.</p>\r
+</div>\r
+<h2>Generating patches with -p</h2>\r
+<div class="sectionbody">\r
+<p>When "git-diff-index", "git-diff-tree", or "git-diff-files" are run\r
+with a <em>-p</em> option, or "git diff" without the <em>--raw</em> option, they\r
+do not produce the output described above; instead they produce a\r
+patch file. You can customize the creation of such patches via the\r
+GIT_EXTERNAL_DIFF and the GIT_DIFF_OPTS environment variables.</p>\r
+<p>What the -p option produces is slightly different from the traditional\r
+diff format.</p>\r
+<ol>\r
+<li>\r
+<p>\r
+It is preceded with a "git diff" header, that looks like\r
+ this:\r
+</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>diff --git a/file1 b/file2</tt></pre>\r
+</div></div>\r
+<p>The <tt>a/</tt> and <tt>b/</tt> filenames are the same unless rename/copy is\r
+involved. Especially, even for a creation or a deletion,\r
+<tt>/dev/null</tt> is _not_ used in place of <tt>a/</tt> or <tt>b/</tt> filenames.</p>\r
+<p>When rename/copy is involved, <tt>file1</tt> and <tt>file2</tt> show the\r
+name of the source file of the rename/copy and the name of\r
+the file that rename/copy produces, respectively.</p>\r
+</li>\r
+<li>\r
+<p>\r
+It is followed by one or more extended header lines:\r
+</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>old mode <mode>\r
+new mode <mode>\r
+deleted file mode <mode>\r
+new file mode <mode>\r
+copy from <path>\r
+copy to <path>\r
+rename from <path>\r
+rename to <path>\r
+similarity index <number>\r
+dissimilarity index <number>\r
+index <hash>..<hash> <mode></tt></pre>\r
+</div></div>\r
+</li>\r
+<li>\r
+<p>\r
+TAB, LF, double quote and backslash characters in pathnames\r
+ are represented as <tt>\t</tt>, <tt>\n</tt>, <tt>\"</tt> and <tt>\\</tt>, respectively.\r
+ If there is need for such substitution then the whole\r
+ pathname is put in double quotes.\r
+</p>\r
+</li>\r
+</ol>\r
+<p>The similarity index is the percentage of unchanged lines, and\r
+the dissimilarity index is the percentage of changed lines. It\r
+is a rounded down integer, followed by a percent sign. The\r
+similarity index value of 100% is thus reserved for two equal\r
+files, while 100% dissimilarity means that no line from the old\r
+file made it into the new one.</p>\r
+</div>\r
+<h2>combined diff format</h2>\r
+<div class="sectionbody">\r
+<p>"git-diff-tree", "git-diff-files" and "git-diff" can take <em>-c</em> or\r
+<em>--cc</em> option to produce <em>combined diff</em>, which looks like this:</p>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>diff --combined describe.c\r
+index fabadb8,cc95eb0..4866510\r
+--- a/describe.c\r
++++ b/describe.c\r
+@@@ -98,20 -98,12 +98,20 @@@\r
+ return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1;\r
+ }\r
+\r
+- static void describe(char *arg)\r
+ -static void describe(struct commit *cmit, int last_one)\r
+++static void describe(char *arg, int last_one)\r
+ {\r
+ + unsigned char sha1[20];\r
+ + struct commit *cmit;\r
+ struct commit_list *list;\r
+ static int initialized = 0;\r
+ struct commit_name *n;\r
+\r
+ + if (get_sha1(arg, sha1) < 0)\r
+ + usage(describe_usage);\r
+ + cmit = lookup_commit_reference(sha1);\r
+ + if (!cmit)\r
+ + usage(describe_usage);\r
+ +\r
+ if (!initialized) {\r
+ initialized = 1;\r
+ for_each_ref(get_name);</tt></pre>\r
+</div></div>\r
+<ol>\r
+<li>\r
+<p>\r
+It is preceded with a "git diff" header, that looks like\r
+ this (when <em>-c</em> option is used):\r
+</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>diff --combined file</tt></pre>\r
+</div></div>\r
+<p>or like this (when <em>--cc</em> option is used):</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>diff --c file</tt></pre>\r
+</div></div>\r
+</li>\r
+<li>\r
+<p>\r
+It is followed by one or more extended header lines\r
+ (this example shows a merge with two parents):\r
+</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>index <hash>,<hash>..<hash>\r
+mode <mode>,<mode>..<mode>\r
+new file mode <mode>\r
+deleted file mode <mode>,<mode></tt></pre>\r
+</div></div>\r
+<p>The <tt>mode <mode>,<mode>..<mode></tt> line appears only if at least one of\r
+the <mode> is different from the rest. Extended headers with\r
+information about detected contents movement (renames and\r
+copying detection) are designed to work with diff of two\r
+<tree-ish> and are not used by combined diff format.</p>\r
+</li>\r
+<li>\r
+<p>\r
+It is followed by two-line from-file/to-file header\r
+</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>--- a/file\r
++++ b/file</tt></pre>\r
+</div></div>\r
+<p>Similar to two-line header for traditional <em>unified</em> diff\r
+format, <tt>/dev/null</tt> is used to signal created or deleted\r
+files.</p>\r
+</li>\r
+<li>\r
+<p>\r
+Chunk header format is modified to prevent people from\r
+ accidentally feeding it to <tt>patch -p1</tt>. Combined diff format\r
+ was created for review of merge commit changes, and was not\r
+ meant for apply. The change is similar to the change in the\r
+ extended <em>index</em> header:\r
+</p>\r
+<div class="literalblock">\r
+<div class="content">\r
+<pre><tt>@@@ <from-file-range> <from-file-range> <to-file-range> @@@</tt></pre>\r
+</div></div>\r
+<p>There are (number of parents + 1) <tt>@</tt> characters in the chunk\r
+header for combined diff format.</p>\r
+</li>\r
+</ol>\r
+<p>Unlike the traditional <em>unified</em> diff format, which shows two\r
+files A and B with a single column that has <tt>-</tt> (minus —\r
+appears in A but removed in B), <tt>+</tt> (plus — missing in A but\r
+added to B), or <tt>" "</tt> (space — unchanged) prefix, this format\r
+compares two or more files file1, file2,… with one file X, and\r
+shows how X differs from each of fileN. One column for each of\r
+fileN is prepended to the output line to note how X's line is\r
+different from it.</p>\r
+<p>A <tt>-</tt> character in the column N means that the line appears in\r
+fileN but it does not appear in the result. A <tt>+</tt> character\r
+in the column N means that the line appears in the last file,\r
+and fileN does not have that line (in other words, the line was\r
+added, from the point of view of that parent).</p>\r
+<p>In the above example output, the function signature was changed\r
+from both files (hence two <tt>-</tt> removals from both file1 and\r
+file2, plus <tt>++</tt> to mean one line that was added does not appear\r
+in either file1 nor file2). Also two other lines are the same\r
+from file1 but do not appear in file2 (hence prefixed with <tt> +</tt>).</p>\r
+<p>When shown by <tt>git diff-tree -c</tt>, it compares the parents of a\r
+merge commit with the merge result (i.e. file1..fileN are the\r
+parents). When shown by <tt>git diff-files -c</tt>, it compares the\r
+two unresolved merge parents with the working tree file\r
+(i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka\r
+"their version").</p>\r
+</div>\r
<h2>EXAMPLES</h2>\r
<div class="sectionbody">\r
<dl>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 23-Oct-2007 01:21:46 UTC\r
+Last updated 03-Nov-2007 02:45:11 UTC\r
</div>\r
</div>\r
</body>\r
the diff to the named paths (you can give directory
names and get diff for all files under them).
+Output format
+-------------
+include::diff-format.txt[]
EXAMPLES
--------
</p>\r
</dd>\r
<dt>\r
--f\|--force\r
+-f|--force\r
</dt>\r
<dd>\r
<p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 02-Nov-2007 02:47:20 UTC\r
+Last updated 03-Nov-2007 02:45:13 UTC\r
</div>\r
</div>\r
</body>\r
does this in the '.git-rewrite/' directory but you can override
that choice by this parameter.
--f\|--force::
+-f|--force::
`git filter-branch` refuses to start with an existing temporary
directory or when there are already refs starting with
'refs/original/', unless forced.
</p>\r
</dd>\r
<dt>\r
--n\r
+-n, --dry-run\r
</dt>\r
<dd>\r
<p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 19-Jul-2007 02:09:47 UTC\r
+Last updated 03-Nov-2007 02:45:14 UTC\r
</div>\r
</div>\r
</body>\r
condition. An error happens when a source is neither existing nor
controlled by GIT, or when it would overwrite an existing
file unless '-f' is given.
--n::
+-n, \--dry-run::
Do nothing; only show what would happen
<div class="content">\r
<pre><tt>$ git checkout feature ;# you were working in "feature" branch and\r
$ work work work ;# got interrupted\r
-$ git commit -a -m 'snapshot WIP' <b>(1)</b>\r
+$ git commit -a -m "snapshot WIP" <b>(1)</b>\r
$ git checkout master\r
$ fix fix fix\r
$ git commit ;# commit with real log\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 02-Aug-2007 07:23:09 UTC\r
+Last updated 03-Nov-2007 02:45:14 UTC\r
</div>\r
</div>\r
</body>\r
------------
$ git checkout feature ;# you were working in "feature" branch and
$ work work work ;# got interrupted
-$ git commit -a -m 'snapshot WIP' <1>
+$ git commit -a -m "snapshot WIP" <1>
$ git checkout master
$ fix fix fix
$ git commit ;# commit with real log
</p>\r
</dd>\r
<dt>\r
--n\r
+-n, --dry-run\r
</dt>\r
<dd>\r
<p>\r
</p>\r
</dd>\r
<dt>\r
---quiet\r
+-q, --quiet\r
</dt>\r
<dd>\r
<p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 19-Jul-2007 02:09:53 UTC\r
+Last updated 03-Nov-2007 02:45:15 UTC\r
</div>\r
</div>\r
</body>\r
-f::
Override the up-to-date check.
--n::
+-n, \--dry-run::
Don't actually remove the file(s), just show if they exist in
the index.
\--ignore-unmatch::
Exit with a zero status even if no files matched.
-\--quiet::
+-q, \--quiet::
git-rm normally outputs one line (in the form of an "rm" command)
for each file removed. This option suppresses that output.
<div class="sectionbody">\r
<dl>\r
<dt>\r
--s\|--strip-comments\r
+-s|--strip-comments\r
</dt>\r
<dd>\r
<p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 11-Aug-2007 08:29:16 UTC\r
+Last updated 03-Nov-2007 02:45:15 UTC\r
</div>\r
</div>\r
</body>\r
OPTIONS
-------
--s\|--strip-comments::
+-s|--strip-comments::
In addition to empty lines, also strip lines starting with '#'.
<stream>::
<div class="sectionbody">\r
<dl>\r
<dt>\r
--q\r
+-q, --quiet\r
</dt>\r
<dd>\r
<p>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 19-Jul-2007 02:09:57 UTC\r
+Last updated 03-Nov-2007 02:45:17 UTC\r
</div>\r
</div>\r
</body>\r
OPTIONS
-------
--q::
+-q, --quiet::
Do not issue an error message if the <name> is not a
symbolic ref but a detached HEAD; instead exit with
non-zero status silently.