【问题标题】:How to take update from source to Github Mirrored Repository?如何从源代码更新到 Github 镜像存储库?
【发布时间】:2019-08-05 06:53:42
【问题描述】:

按照以下说明操作后,我可以在我的 GitHub 帐户中创建镜像。但是在那之后如何从源存储库中获取更新。

https://help.github.com/en/articles/duplicating-a-repository#mirroring-a-repository

打开 Git Bash。

创建存储库的裸克隆。

$ git clone --bare https://github.com/exampleuser/old-repository.git 镜像推送到新仓库。

$ cd old-repository.git $ git push --mirror https://github.com/exampleuser/new-repository.git删除临时 您在步骤 1 中创建的本地存储库。

$ cd .. $ rm -rf old-repository.git

【问题讨论】:

    标签: git github git-clone git-fetch git-mirror


    【解决方案1】:

    重复相同的裸克隆和镜像推送会从源更新存储库。

    您每次想要更新镜像时都可以采用相同的步骤: https://help.github.com/en/articles/duplicating-a-repository#mirroring-a-repository

    【讨论】:

      猜你喜欢
      • 2021-04-23
      • 1970-01-01
      • 1970-01-01
      • 2020-10-10
      • 1970-01-01
      • 2021-01-17
      • 2013-03-30
      • 2022-08-05
      • 1970-01-01
      相关资源
      最近更新 更多