У меня есть измененный файл, который я хочу вернуть к тому, что есть в последней фиксации, но он «застрял» там, всегда помечен как измененный.
$ 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
Но вывод статус git остался прежним. Затем я пытаюсь:
$git reset --hard master
HEAD is now at 02c9613 test commit message
И вывод git status ВСЕ ЕЩЕ тот же.
Есть идеи, как мне избавиться от предполагаемых изменений в этом файле?