1. 程式人生 > >解決使用git時提示“failed to sync branch”

解決使用git時提示“failed to sync branch”

當建立了一個空的git專案,本地複製進來一大堆檔案,想做任何git操作的時候,就會報
 

failed to sync this branch
You might need to open a shell and debug the state of this repo.

也許你會根據提示去執行

debug xxx

然而會發現沒什麼用

實際原因就是沒有初始化

在當前目錄執行一下

git init

就OK了