【发布时间】:2020-11-20 02:56:36
【问题描述】:
我在 github 上有一个远程存储库和另一个用于备份的远程存储库。 由于存储库非常大,我不希望每次都使用 git push --mirror(大于 20GB)并且希望每次只同步最新的更改。
我想写一个这样的脚本:
for each branch in githubRemote/branches do:
if branch != otherRemote/branch:
checkout githubRemote/branch
push branch to otherRemote
【问题讨论】:
-
为什么不在备份回购系统上运行
git fetch origin? Git 已经负责只传输丢失的内容。如果这对您不起作用,可以提供有关您的确切设置/情况的更多信息。 -
另一个远程在 TFS 2015 服务器上。我不认为我可以直接访问存储库
-
@FelixKling 关于设置您还需要了解什么?
标签: bash git shell tfs tfs-2015