Show difference.
--- a/git.rst Mon Nov 27 22:33:06 2017 +0200
+++ b/git.rst Tue Dec 05 23:51:54 2017 +0200
@@ -85,6 +85,37 @@
1 files changed, 4 insertions(+), 0 deletions(-)
create mode 100644 app.c
+Show difference
+===============
+
+Show difference between index/stage and working tree::
+
+ $ git diff
+
+Show difference between ``HEAD`` and index (what is going to be commited)::
+
+ $ git diff --cached
+ $ git diff --staged
+
+.. note:: ``--cached`` and ``--staged`` are synonyms.
+
+Show difference beetween ``HEAD`` and working tree (what is commited after ``git commit -a``)::
+
+ $ git diff HEAD
+ $ git diff HEAD -- $path
+
+Show difference in changeset::
+
+ $ git show $hash
+
+Show difference between revisions::
+
+ $ git diff $rev1..$rev2
+ $ git diff ORIG_HEAD..HEAD
+
+https://stackoverflow.com/questions/3293607/difference-between-git-head-and-the-current-project-state
+ Difference between git HEAD and the current project state?
+
Undo tracking added file.
=========================