git reset --hard HEAD
给我的是
git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# "LIFE/uploads/docs/Community_Plan_onlineA\314\203\342\200\240%92.pdf"
nothing added to commit but untracked files present (use "git add" to track)
通常情况下,执行清理操作可以删除这个未跟踪的文件。
git clean -df
Removing "LIFE/uploads/docs/Community_Plan_onlineA\314\203\342\200\240%92.pdf"
然而,我正在遇到这个问题。
git status
# On branch master
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# deleted: "LIFE/uploads/docs/Community_Plan_online\303\203\342\200\240%92.pdf"
#
no changes added to commit (use "git add" and/or "git commit -a")
请注意文件名略有不同(_Plan_online\303而不是_Plan_onlineA\314)。是什么导致这个文件被卡住了?我正在使用OSX并设置了core.autocrlf=false。