New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use -- when calling diff #516

rgaiacs opened this Issue May 11, 2018 · 0 comments


None yet
1 participant

rgaiacs commented May 11, 2018

Sometimes when I use git diff I receive

fatal: ambiguous argument 'foo': unknown revision or path not in the working tree.

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

$ git diff HEAD mars.txt

we will use

$ git diff HEAD -- mars.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment