Reputation: 3758
I have a modified file on my current working directory called file.txt
. I want to compare it with a version of it on debug branch. The following command does not work:
git diff file.txt debug:file.txt
fatal: Path 'file.txt' exists on disk, but not in 'debug'
How can I compare them? Do I have to commit first?
Upvotes: 0
Views: 969
Reputation: 7985
Use the following command to compare file.txt
from current branch to debug
branch:
git diff debug file.txt
Upvotes: 2