From 499efc2c53facb6faea426a42b6cb394362b0c56 Mon Sep 17 00:00:00 2001 From: Chris Geroux Date: Tue, 30 Apr 2024 12:04:49 -0300 Subject: [PATCH 1/2] Incorrect number of commits before head for shown output. As I followed along, the $ git diff HEAD~3 is back one commit further than my history. It is possible if a previous aside is followed that this might not generate an error about that version not existing, however, the output shown indicates no such commit. So the command is inconsistent with the output shown. A simple fix is to replace the "3" with a "2" --- episodes/05-history.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/episodes/05-history.md b/episodes/05-history.md index fcfbd1364f..4ee9131862 100644 --- a/episodes/05-history.md +++ b/episodes/05-history.md @@ -73,7 +73,7 @@ If we want to see the differences between older commits we can use `git diff` again, but with the notation `HEAD~1`, `HEAD~2`, and so on, to refer to them: ```bash -$ git diff HEAD~3 mars.txt +$ git diff HEAD~2 mars.txt ``` ```output From 3590ed7ea3e063f789df912aa8738c0151f82029 Mon Sep 17 00:00:00 2001 From: Chris Geroux Date: Tue, 30 Apr 2024 14:34:07 -0300 Subject: [PATCH 2/2] Missed a HEAD~3 --- episodes/05-history.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/episodes/05-history.md b/episodes/05-history.md index 4ee9131862..95887a9a83 100644 --- a/episodes/05-history.md +++ b/episodes/05-history.md @@ -93,7 +93,7 @@ well as the commit message, rather than the *differences* between a commit and o working directory that we see by using `git diff`. ```bash -$ git show HEAD~3 mars.txt +$ git show HEAD~2 mars.txt ``` ```output