GIT还原文件报错
$ git reset --hard HEAD
fatal: Unable to create 'D:/01_project/02_XXXXX/XXXXX/XXXXX_XXXXX_XXXXX/.git/index.lock': File exists.
Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
另一个 git 进程似乎正在此存储库中运行,例如
由“git commit”打开的编辑器。请确保所有流程
已终止,然后重试。如果仍然失败,则 git 进程
可能之前在此存储库中崩溃:
手动删除文件以继续。
$ git checkout drivers/soc/usb/usb.a
Unlink of file 'drivers/soc/usb/usb.a' failed. Should I try again? (y/n) y
Unlink of file 'drivers/soc/usb/usb.a' failed. Should I try again? (y/n) y
Unlink of file 'drivers/soc/usb/usb.a' failed. Should I try again? (y/n) y
Unlink of file 'drivers/soc/usb/usb.a' failed. Should I try again? (y/n) y
Unlink of file 'drivers/soc/usb/usb.a' failed. Should I try again? (y/n) n
error: unable to unlink old 'drivers/soc/usb/usb.a': Invalid argument
Updated 0 paths from the index