![](/img/trans.png)
[英]Clone GIT Repository Subfolder into existing Repo with identical folder structure
[英]Clone a Git repo into the current folder (not a new subfolder)
僅供參考我在OSX上運行MAMP。 遠程回購很好。 我已經清除了本地目錄中的.git文件夾和.gitignore文件,但是因為我遇到了問題。 這是我目前面臨的問題:
如果我在我的本地文件夾中執行git init,然后將指針添加到原始主服務器,它將無法同步 - 永遠需要並且只是掛起。
如果我執行git clone https://me@bitbucket.org/myrepo.git然后它會在同名的子文件夾中創建git repo - 而不是我想要的。
如果我在父文件夾(myrepo上方)中執行git clone https://me@bitbucket.org/myrepo.git ,那么它告訴我它不能,因為目標路徑'myrepo'已經存在且不為空。
我如何使用git說“嘿,重建.git和.gitignore文件到這個文件夾 ,讓我們重新開始?
試試這個:
git clone https://me@bitbucket.org/myrepo.git .
請注意尾隨.
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.