【发布时间】: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