1. 程式人生 > >fatal: destination path '.' already exists and is not an empty directory. 錯誤及解決辦法

fatal: destination path '.' already exists and is not an empty directory. 錯誤及解決辦法

今天在使用Git for Windows clone程式碼時,遇到了題目所示的錯誤,簡單來說就是目標路徑‘.’已經存在並且不是一個空目錄。

可是在我在資料夾下並沒有看到任何檔案,顯示“該資料夾為空”,然後自然而然地,我想到了這個'.'路徑是不是被Windows隱藏了?

於是我開啟工具->資料夾選項->檢視->顯示隱藏檔案,終於發現了隱藏資料夾“.git”。

刪掉該資料夾後,再次執行git clone,成功拉下程式碼。