git show bbb738746b14e8e4ac09a443e9ac1c931ad61d07
Show details of a commit SHA along with diff
commit bbb738746b14e8e4ac09a443e9ac1c931ad61d07
Author: Nitin Nizhawan <abc@example.com>
Date: Sat Feb 27 21:00:29 2016 +0530
Commit A
diff --git a/testfile.txt b/testfile.txt
new file mode 100644
index 0000000..557db03
--- /dev/null
+++ b/testfile.txt
@@ -0,0 +1 @@
+Hello World
git show bbb738
Show details of a abbreviated commit SHA along with diff
commit bbb738746b14e8e4ac09a443e9ac1c931ad61d07
Author: Nitin Nizhawan <abc@example.com>
Date: Sat Feb 27 21:00:29 2016 +0530
Commit A
diff --git a/testfile.txt b/testfile.txt
new file mode 100644
index 0000000..557db03
--- /dev/null
+++ b/testfile.txt
@@ -0,0 +1 @@
+Hello World
git show master
Show commit details along with diff pointed to by a ref
commit bbb738746b14e8e4ac09a443e9ac1c931ad61d07
Author: Nitin Nizhawan <abc@example.com>
Date: Sat Feb 27 21:00:29 2016 +0530
Commit A
diff --git a/testfile.txt b/testfile.txt
new file mode 100644
index 0000000..557db03
--- /dev/null
+++ b/testfile.txt
@@ -0,0 +1 @@
+Hello World
git show HEAD@{7}
Show details of a commit along with diff pointed to by a reference in reflog
commit bbb738746b14e8e4ac09a443e9ac1c931ad61d07
Author: Nitin Nizhawan <abc@example.com>
Date: Sat Feb 27 21:00:29 2016 +0530
Commit A
diff --git a/testfile.txt b/testfile.txt
new file mode 100644
index 0000000..557db03
--- /dev/null
+++ b/testfile.txt
@@ -0,0 +1 @@
+Hello World
git show master@{3.hour.41.minute.ago}
Show details of a commit where master was 3 hour 41 minutes ago. Other examples include ref@{yesterday}
commit f46d0d9949274bba7f797a5b63bc004f291905b4
Author: Nitin Nizhawan
Date: Sat Feb 27 21:01:03 2016 +0530
Commit B
diff --git a/testfile.txt b/testfile.txt
index 557db03..bc1c618 100644
--- a/testfile.txt
+++ b/testfile.txt
@@ -1 +1,2 @@
Hello World
+ABC