Git to list changed files

Today I want to make a brief summary of git log possibilities. There’s a huge range of git log commands to choose from. I have chosen only a few. Let’s limit git response to the latest commit with HEAD^! target. So here we go:

git log HEAD^!
commit 68d0e02d20bdbdbaf3bce24ea5cfd51a854157a8
Author: David Hrbáč <david@hrbac.cz>
Date:   Sat Dec 8 16:10:44 2012 +0100
 
    dnsmasq-2.64-1: new upstream release


git log --name-only HEAD^!
commit 68d0e02d20bdbdbaf3bce24ea5cfd51a854157a8
Author: David Hrbáč <david@hrbac.cz>
Date:   Sat Dec 8 16:10:44 2012 +0100
 
    dnsmasq-2.64-1: new upstream release
 
specs/dnsmasq/dnsmasq.spec


git log --name-status HEAD^!
commit 68d0e02d20bdbdbaf3bce24ea5cfd51a854157a8
Author: David Hrbáč <david@hrbac.cz>
Date:   Sat Dec 8 16:10:44 2012 +0100
 
    dnsmasq-2.64-1: new upstream release
 
M       specs/dnsmasq/dnsmasq.spec


git log --stat HEAD^!
commit 68d0e02d20bdbdbaf3bce24ea5cfd51a854157a8
Author: David Hrbáč <david@hrbac.cz>
Date:   Sat Dec 8 16:10:44 2012 +0100
 
    dnsmasq-2.64-1: new upstream release
 
 specs/dnsmasq/dnsmasq.spec | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


git log -p HEAD^!
commit 68d0e02d20bdbdbaf3bce24ea5cfd51a854157a8
Author: David Hrbáč <david@hrbac.cz>
Date:   Sat Dec 8 16:10:44 2012 +0100
 
    dnsmasq-2.64-1: new upstream release
 
diff --git a/specs/dnsmasq/dnsmasq.spec b/specs/dnsmasq/dnsmasq.spec
index d9ae51a..6f2b309 100644
--- a/specs/dnsmasq/dnsmasq.spec
+++ b/specs/dnsmasq/dnsmasq.spec
@@ -9,7 +9,7 @@
 
 Summary: Lightweight caching nameserver with integrated DHCP server
 Name: dnsmasq
-Version: 2.63
+Version: 2.64
 Release: 1%{?dist}
 License: GPL
 Group: System Environment/Daemons
@@ -161,6 +161,9 @@ fi
 %{_sbindir}/dnsmasq
 
 %changelog
+* Sat Dec 08 2012 David Hrbáč <david@hrbac.cz> - 2.64-1
+- new upstream release
+
 * Thu Aug 30 2012 Dag Wieers <dag@wieers.com> - 2.63-1
 - Updated to release 2.63.


git diff HEAD^!
diff --git a/specs/dnsmasq/dnsmasq.spec b/specs/dnsmasq/dnsmasq.spec
index d9ae51a..6f2b309 100644
--- a/specs/dnsmasq/dnsmasq.spec
+++ b/specs/dnsmasq/dnsmasq.spec
@@ -9,7 +9,7 @@
 
 Summary: Lightweight caching nameserver with integrated DHCP server
 Name: dnsmasq
-Version: 2.63
+Version: 2.64
 Release: 1%{?dist}
 License: GPL
 Group: System Environment/Daemons
@@ -161,6 +161,9 @@ fi
 %{_sbindir}/dnsmasq
 
 %changelog
+* Sat Dec 08 2012 David Hrbáč <david@hrbac.cz> - 2.64-1
+- new upstream release
+
 * Thu Aug 30 2012 Dag Wieers <dag@wieers.com> - 2.63-1
 - Updated to release 2.63.


git diff --name-only HEAD^!
specs/dnsmasq/dnsmasq.spec


git diff --name-status HEAD^!
M       specs/dnsmasq/dnsmasq.spec


git diff --stat HEAD^!
 specs/dnsmasq/dnsmasq.spec | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


git whatchanged --name-only HEAD^!
commit 68d0e02d20bdbdbaf3bce24ea5cfd51a854157a8
Author: David Hrbáč <david@hrbac.cz>
Date:   Sat Dec 8 16:10:44 2012 +0100
 
    dnsmasq-2.64-1: new upstream release
 
specs/dnsmasq/dnsmasq.spec


git whatchanged --name-status HEAD^!
commit 68d0e02d20bdbdbaf3bce24ea5cfd51a854157a8
Author: David Hrbáč <david@hrbac.cz>
Date:   Sat Dec 8 16:10:44 2012 +0100
 
    dnsmasq-2.64-1: new upstream release
 
M       specs/dnsmasq/dnsmasq.spec


git whatchanged --stat HEAD^!
commit 68d0e02d20bdbdbaf3bce24ea5cfd51a854157a8
Author: David Hrbáč <david@hrbac.cz>
Date:   Sat Dec 8 16:10:44 2012 +0100
 
    dnsmasq-2.64-1: new upstream release
 
 specs/dnsmasq/dnsmasq.spec | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


git whatchanged HEAD^!
commit 68d0e02d20bdbdbaf3bce24ea5cfd51a854157a8
Author: David Hrbáč <david@hrbac.cz>
Date:   Sat Dec 8 16:10:44 2012 +0100
 
    dnsmasq-2.64-1: new upstream release
 
:100644 100644 d9ae51a... 6f2b309... M  specs/dnsmasq/dnsmasq.spec