I'm at a bash prompt in a git directory.

I want to see how file a/b.c differs from file m/n.c. I type: `diff a/b.c m/n.c`.

I want to see how file a/b.c in git revision HEAD differs from in git revision X. I type: `git diff X -- a/b.c`.

I want to see how file a/b.c in git revision HEAD differs from file m/n.c (which does not exist in revision HEAD) in git revision X: I type:

…what do I type?

Follow

@mcc

`git diff HEAD:a/b.c X:m/n.c` seems to work

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.