ファイルがありますa.txt。
cat a.txt
> hello
の内容a.txtは「こんにちは」です。
コミットします。
git add a.txt
git commit -m "first commit"
次にa.txt、testdirに移動します。
mkdir test
mv a.txt test
次に、2回目のコミットを行います。
git add -A
git commit -m "second commit"
最後に、a.txt代わりに「さようなら」と言うように編集します。
cat a.txt
> goodbye
最後にコミットします。
git add a.txt
git commit -m "final commit"
これが私の質問です:
a.txt最後のコミットと最初のコミットの内容をどのように比較しますか?
私が試した:git diff HEAD^^..HEAD -M a.txt、それはうまくいきませ
んでした。 git log --follow a.txtは名前の変更を適切に検出しますが、に相当するものが見つかりませんgit diff。ありますか?