.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "GIT\-DIFF" "1" "10/03/2006" "" ""
+.TH "GIT\-DIFF" "1" "12/03/2006" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
\(bu
When one <tree\-ish> is given, the working tree and the named tree are compared, using
git\-diff\-index. The option
-\-\-cached
+\-\-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.
.TP
\(bu
When two <tree\-ish>s are given, these two trees are compared using
.sp
.nf
$ git diff \fB(1)\fR
-$ git diff \-\-cached \fB(2)\fR
+$ git diff \-\-index \fB(2)\fR
$ git diff HEAD \fB(3)\fR
.fi
.sp
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "GIT\-SYMBOLIC\-REF" "1" "10/03/2006" "" ""
+.TH "GIT\-SYMBOLIC\-REF" "1" "12/03/2006" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.sp
Give two arguments, create or update a symbolic ref <name> to point at the given branch <ref>.
.sp
-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 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 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.
.sp
-A symbolic ref can be a regular file that stores a string that begins with ref: refs/. For example, your .git/HEAD \fBcan\fR 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.
-.sp
-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.
+.SH "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). Therefore symbolic links are now deprecated and symbolic refs are used by default.
.sp
.SH "AUTHOR"
Written by Junio C Hamano <junkio@cox.net>