1

In my case, my HEAD I am working on as a file called otherfile.php which was originally made by cp file.php otherfile.php.

Now, after editing both file.php and otherfile.php for some time, I want to see how much my otherfile.php has changed from the original file.php (whose commit is tagged with branchA).

How can I do this? And does this question make sense?

Alexander Bird
  • 38,679
  • 42
  • 124
  • 159
  • Possibly duplicate of [this](http://stackoverflow.com/questions/916822/unable-to-diff-files-in-two-separate-branches-in-git) – vpatil Feb 23 '12 at 15:53

1 Answers1

2
git diff branchA:file.php HEAD:otherfile.php
rtn
  • 127,556
  • 20
  • 111
  • 121
  • Ok. Apparently the HEAD file has to be the second argument. This answer is what I tried, but with the HEAD file first, so I guess that's why it didn't work. Thanks. – Alexander Bird Feb 23 '12 at 16:28