I have a.txt file.
cat a.txt > hello
The contents of a.txt are "hello."
I am doing a commit.
git add a.txt git commit -m "first commit"
Then move a.txt to the test directory.
mkdir test mv a.txt test
Then I do my second commit.
git add -A git commit -m "second commit"
Finally, I edit a.txt to say goodbye.
cat a.txt > goodbye
I am making the last commit.
git add a.txt git commit -m "final commit"
Now here is my question:
How do I distinguish the contents of a.txt between my last commit and my first commit?
I tried: git diff HEAD^^..HEAD -M a.txt , but this did not work. git log --follow a.txt correctly defines renaming, but I cannot find an equivalent for git diff . There is one?
git diff rename
Ken Hirakawa Oct 13 '11 at 19:08 2011-10-13 19:08
source share