equal
deleted
inserted
replaced
82 $ git commit |
82 $ git commit |
83 ... Write message log ... |
83 ... Write message log ... |
84 Created initial commit 2169263: My first commit massage. |
84 Created initial commit 2169263: My first commit massage. |
85 1 files changed, 4 insertions(+), 0 deletions(-) |
85 1 files changed, 4 insertions(+), 0 deletions(-) |
86 create mode 100644 app.c |
86 create mode 100644 app.c |
|
87 |
|
88 Show difference |
|
89 =============== |
|
90 |
|
91 Show difference between index/stage and working tree:: |
|
92 |
|
93 $ git diff |
|
94 |
|
95 Show difference between ``HEAD`` and index (what is going to be commited):: |
|
96 |
|
97 $ git diff --cached |
|
98 $ git diff --staged |
|
99 |
|
100 .. note:: ``--cached`` and ``--staged`` are synonyms. |
|
101 |
|
102 Show difference beetween ``HEAD`` and working tree (what is commited after ``git commit -a``):: |
|
103 |
|
104 $ git diff HEAD |
|
105 $ git diff HEAD -- $path |
|
106 |
|
107 Show difference in changeset:: |
|
108 |
|
109 $ git show $hash |
|
110 |
|
111 Show difference between revisions:: |
|
112 |
|
113 $ git diff $rev1..$rev2 |
|
114 $ git diff ORIG_HEAD..HEAD |
|
115 |
|
116 https://stackoverflow.com/questions/3293607/difference-between-git-head-and-the-current-project-state |
|
117 Difference between git HEAD and the current project state? |
87 |
118 |
88 Undo tracking added file. |
119 Undo tracking added file. |
89 ========================= |
120 ========================= |
90 |
121 |
91 You do:: |
122 You do:: |