如何复制一个git仓库
# 如何复制一个git仓库
有时候,我们需要复制Github (opens new window)一个仓库到自己、公司的私有库,类似Fork的功能。
# 镜像一个仓库
- bare clone一个仓库
git clone --bare https://github.com/exampleuser/old-repository.git
1
- mirror push到新仓库
git push --mirror https://github.com/exampleuser/new-repository.git
1