2017-02-10 43 views
1

我有一個遠程git存儲庫的本地副本。每次我執行「混帳地位」,我得到這個錯誤:git status:錯誤的文件名導致「協議錯誤」

git status 
public/app.chart/license/Creative Commons�� Attribution-NonCommercial-ShareAlike 4.0 International�� CC BY-NC-SA 4.0.pdf: Protocol error 
On branch master 
Your branch is up-to-date with 'origin/master'. 

說文件不存儲庫中的存在。 當我切換分支,我得到這個消息:

git checkout test_branch 
D "public/app.chart/license/Creative Commons\200\224 Attribution-NonCommercial-ShareAlike 4.0 International\200\224 CC BY-NC-SA 4.0.pdf" 
Switched to branch 'test_branch' 

有什麼辦法來解決這個問題呢?

+0

很明顯來自'混帳status'和'混帳checkout'該文件*不*存在在存儲庫中。它只是不存在於*工作樹*中,大概是因爲操作系統拒絕路徑名。你在MacOS上嗎?你有什麼版本的Git? – torek

回答

1

試試看後問題仍然存在:

cd /path/to/my/local/repo 
git config core.quotepath false 

git config man page

If this variable is set to false, the bytes higher than 0x80 are not quoted but output as verbatim.

+0

似乎沒有任何區別,但感謝您的幫助:-) – Ledazinha

+1

@Ledazinha好的。你使用的是什麼版本的Git?並在哪個操作系統? – VonC

+0

Git版本是2.7.4。 OS是Ubuntu 16.04 xenial;內核是x86_64 Linux 4.4.0-42-通用的。 – Ledazinha