最新のコミットにあるものに戻したい変更済みファイルがありますが、常に変更済みとしてマークされている「スタック」しています。
$ git status
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: index.php
#
no changes added to commit (use "git add" and/or "git commit -a")
次に試してみます:
$git checkout -- index.php
ただし、gitstatusの出力は同じです。次に試してみます:
$git reset --hard master
HEAD is now at 02c9613 test commit message
そして、gitstatusの出力はまだ同じです。
そのファイルの想定される変更をどのように取り除くことができるかについてのアイデアはありますか?