Итак, у меня есть файл, который был изменен локально:
(dev) go|c:\srv\lib\core\dknorway> git status
On branch master
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: dknorway/data/postnrdata.txt
no changes added to commit (use "git add" and/or "git commit -a")
Я хочу отменить локальные изменения (и выбрать правильную версию):
(dev) go|c:\srv\lib\core\dknorway> git checkout dknorway/data/postnrdata.txt
Updated 1 path from the index
I пробовал добавить --
и использовать windows разделители пути (/
) с точно такими же результатами:
(dev) go|c:\srv\lib\core\dknorway> git status
On branch master
Your branch is behind 'origin/master' by 1 commit, and can be fast-forwarded.
(use "git pull" to update your local branch)
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: dknorway/data/postnrdata.txt
no changes added to commit (use "git add" and/or "git commit -a")
файл стал зомби ie .. Что я сделал не так?
Обновление: да, есть две директории dknorway, одна внутри другой:
(dev) go|c:\srv\lib\core\dknorway> dir dknorway\data
Volume in drive C has no label.
Volume Serial Number is 04D6-81F0
Directory of c:\srv\lib\core\dknorway\dknorway\data
2019-11-17 21:24 <DIR> .
2019-11-17 21:24 <DIR> ..
2019-11-17 21:24 150,705 postnrdata.txt
1 File(s) 150,705 bytes
2 Dir(s) 202,736,001,024 bytes free
(dev) go|c:\srv\lib\core\dknorway>