Eu uso apenas git log
e git show
ou git diff
. por exemplo,
# git log --oneline /etc/squid/squid.conf
907df30 saving uncommitted changes in /etc prior to apt run
a612769 daily autocommit
6d45b99 saving uncommitted changes in /etc prior to apt run
0f21707 daily autocommit
9a95a9b saving uncommitted changes in /etc prior to apt run
b2518f4 daily autocommit
338b4a7 daily autocommit
862d5e6 committing changes in /etc after apt run
ff6a8fd daily autocommit
2d64d79 saving uncommitted changes in /etc prior to apt run
7e3bb0e Initial commit
# git diff a612769 907df30 /etc/squid/squid.conf
diff --git a/squid/squid.conf b/squid/squid.conf
index 0e08217..e630ed9 100644
--- a/squid/squid.conf
+++ b/squid/squid.conf
@@ -7876,9 +7876,3 @@ forwarded_for off
# not all I/O types supports large values (eg on Windows).
#Default:
# Use operating system limits set by ulimit.
-
-#httpd_accel_host virtual
-#httpd_accel_port 80
-#httpd_accel_with_proxy on
-#httpd_accel_uses_host_header on
-
Se eu quisesse o conteúdo completo de uma revisão específica de um arquivo, usaria git ls-tree
(para obter o sha1 do blob do arquivo) e git cat-file
para exibi-lo. por exemplo.
# git cat-file blob "$(git ls-tree a612769 /etc/squid/squid.conf |
awk '{print $3}')" > /tmp/squid.conf.a612769