1. 程式人生 > >fatal: destination path '.' already exists and is not an empty directory.如何 clone git 專案到一個非空目錄

fatal: destination path '.' already exists and is not an empty directory.如何 clone git 專案到一個非空目錄

解決的辦法是:

1. 進入非空目錄,假設是 /workdir/proj1

2. git clone --no-checkout https://git.oschina.net/NextApp/platform.git tmp

3. mv tmp/.git .   #將 tmp 目錄下的 .git 目錄移到當前目錄

4. rmdir tmp

5. git reset --hard HEAD

然後就可以進行各種正常操作了。

相關推薦

fatal: destination path '.' already exists and is not an empty directory.如何 clone git 專案一個空目錄

解決的辦法是: 1. 進入非空目錄,假設是 /workdir/proj1 2. git clone --no-checkout https://git.oschina.net/NextApp/platform.git tmp 3. mv tmp/.git .   #將 tmp 目錄下的 .git 目

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

今天在使用Git for Windows clone程式碼時,遇到了題目所示的錯誤,簡單來說就是目標路徑‘.’已經存在並且不是一個空目錄。 可是在我在資料夾下並沒有看到任何檔案,顯示“該資料夾為空”,然後自然而然地,我想到了這個'.'路徑是不是被Windows隱藏了? 於是

解決本地建立了程式碼庫.git檔案,想clone遠端庫,出現git fatal: destination path '*' already exists and is not an empty

出現這個問題時,百度一下,出現這個答案:原部落格地址:https://blog.csdn.net/u011687186/article/details/75277533網上說需要刪除或者重新命名已經存在的本地檔案,然後在clone 其實不用。第一步 :進入到已存在的目錄  c

Docker執行tracker,The path /var/fdfs/tracker is not shared from OS X and is not known to Docker

Docker裝FastDFS,執行tracker,錯誤:The path /var/fdfs/tracker is not shared from OS X and is not known to Docker 執行如下命令開啟tracker 服務 docker run -dti -

Docker 安裝 出現 Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

在 安裝 Docker 映象時 docker run -p 80:80 --name mynginx -v $PWD/www:/www -v $PWD/conf/nginx.conf:/etc/nginx/nginx.conf -v $PWD/logs:/wwwlogs -d nginx 1.

Git 提示fatal: remote origin already exists 錯誤解決辦法

倉庫 remote gin rem config文件 add fbi already fat 今天使用git 添加遠程github倉庫的時候提示錯誤:fatal: remote origin already exists. 最後找到解決辦法如下: 1、先刪除遠程 Gi

git報錯:'fatal:remote origin already exists

目錄 eas repo syn baidu for .cn com 分享 git報錯:‘fatal:remote origin already exists‘怎麽處理?附上git常用操作以及說明。 git添加遠程庫的時候有可能出現如下的錯誤, 怎麽解決? 只要兩步

gitGit 提示fatal: remote origin already exists 錯誤解決辦法

遠程 分享 mage mod dal -s lock 解決 ack 今天使用git 添加遠程github倉庫的時候提示錯誤:fatal: remote origin already exists. 最後找到解決辦法如下: 1、先刪除遠程 Git

github常見操作和常見錯誤!錯誤提示:fatal: remote origin already exists.

空格 多余 因此 ear rem detail tco acs core 如果輸入$ git remote add origin [email protected]:djqiang(github帳號名)/gitdemo(項目名).git 提示出錯信息:fatal: re

git錯誤fatal: remote origin already exists.

rem ready bsp str mce nbsp exist 輸入 strong 輸入 $git remote add origin https://github.com/用戶名/項目.git,提示fatal: remote origin already exists.

Git 提示fatal: remote origin already exists 錯誤怎麼解決

今天連線遠端倉庫得時候報了一個錯誤:fatal: remote origin already exists  這個呢解決只需兩步 1.先刪除遠端git倉庫 git remote rm origin 2.在新增到遠端倉庫就行了 git remote add origin

fatal: remote origin already exists. (遠端來源已經存在 解決辦法)

在當我們輸入` git remote add origin https://gitee.com/(github/碼雲賬號)/(github/碼雲專案名).git ` 就會報如下的錯 fatal: remote origin already exists.   翻譯過來

git push遠端倉庫時報錯:fatal: remote origin already exists. (已解決)

   在做遠端倉庫除錯階段,突然發現修改後的專案無法push了:  如果輸入$ git remote add origin [email protected]:djqiang(github帳號名)/gitdemo(專案名).git   

git報錯fatal: remote origin already exists.

執行git remote add origin https://github.com/LittleLawson/HttpClientExample.git出現fatal: remote origin already exists. 1. 報錯資訊 [email prot

fatal: remote origin already exists. (遠端來源已經存在 解決辦法)

在當我們輸入` git remote add origin https://gitee.com/(github/碼雲賬號)/(github/碼雲專案名).git ` 就會報如下的錯 fatal: remote origin already exists.   翻譯過來就

報錯:fatal: remote origin already exists.

報錯:fatal: remote origin already exists.解決方法 刪除遠端倉庫: git remote rm origin 在執行你自己的那一條git remote add origin命令就ok了: git remo

安裝 VMWare tools 時出現“The path "/usr/bin/gcc" is not valid path to the gcc binary”解決

環境:Vmware 8.0+RedHat 9.0 問題:安裝 VMWare tools 時詢問GCC安裝位置,出現“The path "/usr/bin/gcc" is not valid path to the gcc binary”。查詢是否安裝了GCC,顯示確實安裝了

安裝vm tools--出錯The path "/usr/bin/gcc" is not valid path to the gcc binary”

系統環境: ubuntu12.04安裝vm tools時出現如下問題The path "/usr/bin/gcc" is not valid path to the gcc binary解決方案:#cat /proc/versionLinux version 3.2.0-29

git使用報錯fatal: remote origin already exists.

$ git remote add origin https://github.com/wangshiyu777/gitusetest.git fatal: remote origin already exists. $ git remote add origin

svn path already exists的解決辦法

這種問題的一般原因是這個path所指的目錄在伺服器端是一個空目錄,對客戶端不可見,客戶端如果新建了這個目錄,而且向伺服器端commit的時候就會報錯,伺服器端此目錄已存在,這個時候就會存在一個問題:就