git diff is first introduced in lesson 04, without any arguments, and is used only to compare changes with HEAD, which is the default behaviour. In that lesson, I wouldn't add anything else.
diff is used for the first time with a file as an argument in lesson 05. However, the way is used here is git diff HEAD mars.txt. Do you know if this syntax (with HEAD) can lead to the same ambiguity you report? If that is not the case, I think it's already safe enough. There is a sentence, however, that says
which is the same as what you would get if you leave out HEAD (try it)
in light of your comment, we could change that and briefly mention what -- is for.
@kekoziar @rgaiacs I saw this error when I was preparing for my instructor training. In my case, it was because I was in the git repository, but I was not actually in the directory with my file and did not supply the path to the file. Once I used cd to move into the proper subdirectory, I no longer saw this error. Your case may be different, but see if that applies next time you see it.
Sometimes when I use
git diffI receive
as an error message. This kind of message could be avoided by using
--to separate commits and files.
What about use
--in the lesson as a good practice? So instead of
we will use
The text was updated successfully, but these errors were encountered: