From 1d8704892623d2cce3e35e3a56c791e6dc1f1c0b Mon Sep 17 00:00:00 2001 From: johnschoneboom <77613706+johnschoneboom@users.noreply.github.com> Date: Wed, 8 Apr 2026 11:37:39 +0100 Subject: [PATCH] Update git diff explanation in history.md Clarified the explanation of the default option for 'git diff' and its behavior with staged files. --- 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 4446e8946e..3ddf211f0d 100644 --- a/episodes/05-history.md +++ b/episodes/05-history.md @@ -62,7 +62,7 @@ index b36abfd..0848c8d 100644 +An ill-considered change ``` -Note that `HEAD` is the default option for `git diff`, so omitting it will not change the command's output at all (give it a try). However, the real power of `git diff` lies in its ability to compare with previous commits. For example, by adding `~1` (where "~" is "tilde", pronounced [**til**\-d*uh*]), we can look at the commit before `HEAD`. +Note that `HEAD` is the default option for `git diff` if there is no staged version, so omitting it will not change the command's output at all in this case (give it a try). If a staged file has been further modified, however, it will compare the modified version to the staged version (try adding guacamole.md to the staged area, making an additional modification, then running `git diff` and `git diff HEAD` again). In any case, the real power of `git diff` lies in its ability to compare with previous commits. For example, by adding `~1` (where "~" is "tilde", pronounced [**til**\-d*uh*]), we can look at the commit before `HEAD`. ```bash $ git diff HEAD~1 guacamole.md