【问题标题】:Is there a way to clone a repository and automatically replace the duplicated files and dirs in the final directory?有没有办法克隆存储库并自动替换最终目录中的重复文件和目录?
【发布时间】:2026-02-09 00:15:01
【问题描述】:

就像当您将一个目录复制到另一个目录时发生的那样,但它已经有一个具有该名称的目录,但您仍然可以复制它并用新文件替换重复的文件。

当我试图强迫它时,它会抛出我:

fatal: destination path 'rep-2' already exists and is not an empty directory.

【问题讨论】:

  • 您只能将 repo 克隆到一个尚不存在的目录中。

标签: git file github clone git-clone


【解决方案1】:

我会先重命名或删除现有文件夹。

然后我将使用预期的文件夹名称克隆存储库。

【讨论】:

    最近更新 更多