由於某種原因,我無法重置我的git工作目錄中的某個特定文件!無法在git中重置爲乾淨的工作目錄
這裏所說:
我做一個git的復位 - 硬現在,
$ git reset --hard
HEAD is now at 97b3164 Added clojure jars for personal tracking and also set clo
jure classpath in jaskirat.el
硬復位後:
$ 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: elpa-to-submit/color-theme.el
#
no changes added to commit (use "git add" and/or "git commit -a")
我以前也試過混帳結帳 - elpa- to-submit/color-theme.el 但似乎沒有讓我回到一個「乾淨的」unfaged工作目錄! :-S
注:我從我的Linux桌面在github上這個回購的克隆,以及,我沒有看到任何像這樣的問題,我的桌面上
曾經那樣做過。我把這個問題放在我自己的問題中,我嘗試了git checkout。它仍然沒有辦法!此外差異不返回任何東西,我沒有做任何我關心的變化。 – Jaskirat 2011-01-23 12:09:44
Woops,對不起,忽略了。我會考慮克隆它並查看克隆中文件的狀態。另外,`git diff`說什麼?另外,你有自定義的清潔/塗抹過濾器嗎? – 2011-01-23 12:12:23
git diff給出了整個文件--- a/elpa-to-submit/color-theme.el +++ b/elpa-to-submit/color-theme.el @@ -11791 +1, 1791 @@作爲差異和混帳差異 - 緩存不給任何東西 – Jaskirat 2011-01-23 12:33:34