w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
git diff HEAD^ HEAD displays nothing

It would display nothing if that particular file had no changes between HEAD^ and HEAD.

Note that with git1.8.5+, you can do a:

git diff @^ -- afile

(@ means HEAD)


git log -p -- aFile would give all the SHA1 were a change for that file occurred.
(-p for displaying the diff)


To see the last modification on a file (without having to deal with HEAD or other SHA1):

git log -1 -p -- aFile




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.