Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion episodes/05-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down