<p>\r
When one <tree-ish> is given, the working tree and the named\r
tree are compared, using <tt>git-diff-index</tt>. The option\r
- <tt>--cached</tt> can be given to compare the index file and\r
+ <tt>--index</tt> can be given to compare the index file and\r
the named tree.\r
+ <tt>--cached</tt> is a deprecated alias for <tt>--index</tt>. It's use is\r
+ discouraged.\r
</p>\r
</li>\r
<li>\r
<div class="listingblock">\r
<div class="content">\r
<pre><tt>$ git diff <b>(1)</b>\r
-$ git diff --cached <b>(2)</b>\r
+$ git diff --index <b>(2)</b>\r
$ git diff HEAD <b>(3)</b></tt></pre>\r
</div></div>\r
<ol>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 03-Oct-2006 08:41:03 UTC\r
+Last updated 03-Dec-2006 01:53:20 UTC\r
</div>\r
</div>\r
</body>\r
* When one <tree-ish> is given, the working tree and the named
tree are compared, using `git-diff-index`. The option
- `--cached` can be given to compare the index file and
+ `--index` can be given to compare the index file and
the named tree.
+ `--cached` is a deprecated alias for `--index`. It's use is
+ discouraged.
* When two <tree-ish>s are given, these two trees are compared
using `git-diff-tree`.
+
------------
$ git diff <1>
-$ git diff --cached <2>
+$ git diff --index <2>
$ git diff HEAD <3>
------------
+
argument to see on which branch your working tree is on.</p>\r
<p>Give two arguments, create or update a symbolic ref <name> to\r
point at the given branch <ref>.</p>\r
-<p>Traditionally, <tt>.git/HEAD</tt> is a symlink pointing at\r
-<tt>refs/heads/master</tt>. When we want to switch to another branch,\r
-we did <tt>ln -sf refs/heads/newbranch .git/HEAD</tt>, and when we want\r
+<p>A symbolic ref is a regular file that stores a string that\r
+begins with <tt>ref: refs/</tt>. For example, your <tt>.git/HEAD</tt> is\r
+a regular file whose contents is <tt>ref: refs/heads/master</tt>.</p>\r
+</div>\r
+<h2>NOTES</h2>\r
+<div class="sectionbody">\r
+<p>In the past, <tt>.git/HEAD</tt> was a symbolic link pointing at\r
+<tt>refs/heads/master</tt>. When we wanted to switch to another branch,\r
+we did <tt>ln -sf refs/heads/newbranch .git/HEAD</tt>, and when we wanted\r
to find out which branch we are on, we did <tt>readlink .git/HEAD</tt>.\r
This was fine, and internally that is what still happens by\r
default, but on platforms that do not have working symlinks,\r
or that do not have the <tt>readlink(1)</tt> command, this was a bit\r
cumbersome. On some platforms, <tt>ln -sf</tt> does not even work as\r
-advertised (horrors).</p>\r
-<p>A symbolic ref can be a regular file that stores a string that\r
-begins with <tt>ref: refs/</tt>. For example, your <tt>.git/HEAD</tt> <strong>can</strong>\r
-be a regular file whose contents is <tt>ref: refs/heads/master</tt>.\r
-This can be used on a filesystem that does not support symbolic\r
-links. Instead of doing <tt>readlink .git/HEAD</tt>, <tt>git-symbolic-ref\r
-HEAD</tt> can be used to find out which branch we are on. To point\r
-the HEAD to <tt>newbranch</tt>, instead of <tt>ln -sf refs/heads/newbranch\r
-.git/HEAD</tt>, <tt>git-symbolic-ref HEAD refs/heads/newbranch</tt> can be\r
-used.</p>\r
-<p>Currently, .git/HEAD uses a regular file symbolic ref on Cygwin,\r
-and everywhere else it is implemented as a symlink. This can be\r
-changed at compilation time.</p>\r
+advertised (horrors). Therefore symbolic links are now deprecated\r
+and symbolic refs are used by default.</p>\r
</div>\r
<h2>Author</h2>\r
<div class="sectionbody">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 03-Oct-2006 08:41:33 UTC\r
+Last updated 03-Dec-2006 01:53:20 UTC\r
</div>\r
</div>\r
</body>\r
Give two arguments, create or update a symbolic ref <name> to
point at the given branch <ref>.
-Traditionally, `.git/HEAD` is a symlink pointing at
-`refs/heads/master`. When we want to switch to another branch,
-we did `ln -sf refs/heads/newbranch .git/HEAD`, and when we want
+A symbolic ref is a regular file that stores a string that
+begins with `ref: refs/`. For example, your `.git/HEAD` is
+a regular file whose contents is `ref: refs/heads/master`.
+
+NOTES
+-----
+In the past, `.git/HEAD` was a symbolic link pointing at
+`refs/heads/master`. When we wanted to switch to another branch,
+we did `ln -sf refs/heads/newbranch .git/HEAD`, and when we wanted
to find out which branch we are on, we did `readlink .git/HEAD`.
This was fine, and internally that is what still happens by
default, but on platforms that do not have working symlinks,
or that do not have the `readlink(1)` command, this was a bit
cumbersome. On some platforms, `ln -sf` does not even work as
-advertised (horrors).
-
-A symbolic ref can be a regular file that stores a string that
-begins with `ref: refs/`. For example, your `.git/HEAD` *can*
-be a regular file whose contents is `ref: refs/heads/master`.
-This can be used on a filesystem that does not support symbolic
-links. Instead of doing `readlink .git/HEAD`, `git-symbolic-ref
-HEAD` can be used to find out which branch we are on. To point
-the HEAD to `newbranch`, instead of `ln -sf refs/heads/newbranch
-.git/HEAD`, `git-symbolic-ref HEAD refs/heads/newbranch` can be
-used.
-
-Currently, .git/HEAD uses a regular file symbolic ref on Cygwin,
-and everywhere else it is implemented as a symlink. This can be
-changed at compilation time.
+advertised (horrors). Therefore symbolic links are now deprecated
+and symbolic refs are used by default.
Author
------