273 Review specific commit with:: |
273 Review specific commit with:: |
274 |
274 |
275 $ git show $REV |
275 $ git show $REV |
276 $ git diff $REV^ $REV |
276 $ git diff $REV^ $REV |
277 |
277 |
|
278 Review merge commit related to specific parent:: |
|
279 |
|
280 $ git diff $REV^1 $REV |
|
281 $ git diff $REV^2 $REV |
|
282 |
|
283 $ git diff HEAD^1 HEAD |
|
284 $ git diff HEAD^2 HEAD |
|
285 |
|
286 .. note:: ``^1`` is the first parent, ``^2`` is the second parent, and so on. |
|
287 |
|
288 ``git show`` command for merge commits shows only changes from conflicting hunks. It is equivalent |
|
289 to (lines that changed as part of the conflict resolution):: |
|
290 |
|
291 $ git diff-tree --cc $REV |
|
292 |
278 Review difference between commits:: |
293 Review difference between commits:: |
279 |
294 |
280 $ git $REV1 $REV2 |
295 $ git $REV1 $REV2 |
281 $ git $REV1..$REV2 |
296 $ git $REV1..$REV2 |
282 $ git $REV1..$REV2 -- $DIR_OR_FILE |
297 $ git $REV1..$REV2 -- $DIR_OR_FILE |
283 |
298 |
284 Review history with diffs:: |
299 Review history with diffs:: |
285 |
300 |
286 $ git log -p |
301 $ git log -p |
287 $ git log -p $FROM_REV |
302 $ git log -p $FROM_REV |
|
303 |
|
304 Review history of merges only:: |
|
305 |
|
306 $ git log --min-parents=2 -p --cc |
288 |
307 |
289 View unpublished git commits / analog of git 'hg outgoing' |
308 View unpublished git commits / analog of git 'hg outgoing' |
290 ========================================================== |
309 ========================================================== |
291 |
310 |
292 ``git`` does not directly support such feature. Recently ``hg`` start tracking |
311 ``git`` does not directly support such feature. Recently ``hg`` start tracking |