【问题标题】:Cloning the same repository multiple times with Github for Windows使用 Github for Windows 多次克隆同一个存储库
【发布时间】:2012-11-15 13:43:51
【问题描述】:

是否可以使用 Github for Windows 多次克隆同一个存储库?我问的原因是我想多次克隆 Laravel 框架,为我使用它的每个项目一次。

【问题讨论】:

  • 我发现使用 Git for Windows 很容易做到这一点,因为您可以克隆到任何目录,但仍然想知道是否可以使用 Github for Windows
  • 我讨厌成为那个人,但为什么首先要使用 Github for Windows?还有其他替代方案可以简化 Git 而不受限制,例如 TortoiseGit
  • 如果你不能这样做,我建议你联系 GitHub。他们往往会很快回复,也许您可​​以在不久的将来解决此错误/实现此功能。
  • 您应该习惯这样的想法,即 GitHub for Windows 仅适用于极少数最常见的用例。您要的只是“普通 Git”的用例,而且很容易使用它。
  • 另请参阅此问题以获取替代解决方法:stackoverflow.com/questions/11000336/…

标签: git github github-for-windows


【解决方案1】:

有可能,而且很简单

在 git bash 中:

git clone <repo> <directory>
git clone <repo> <directory_2>
.............................
git clone <repo> <directory_N-1>
git clone <repo> <directory_N>

Repo 是您的存储库 URL,所有这些目录 [N] 都是您想要的目录名称

另外,为什么不将已经克隆的 repo 复制到另一个目录?

【讨论】:

  • 制作副本不会显示在列表、本地或 github 中,因为我猜它具有相同的 git 信息
  • 这真的没关系,回购的每个克隆副本都与其他副本相同(假设克隆操作之间没有新的提交)。要在 github 上的 repo 列表中显示存储库,您需要 fork 它,而不仅仅是克隆。
猜你喜欢
  • 1970-01-01
  • 2021-12-31
  • 1970-01-01
  • 2021-11-18
  • 2019-10-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-04-19
相关资源
最近更新 更多