I moved a file using git mv. Now I would like to do a diff on the new file to compare it with the old file (with the old, now non-existent name).
How do I do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to use -M to let git autodetect the moved file when diffing. Using just
git diffas knittl mentioned does not work for me.So simply:
git diff -Mshould do it.The documentation for this switch is: