gpt4 book ai didi

git - 将存储库从 github 迁移到本地文件系统?

转载 作者:太空狗 更新时间:2023-10-29 13:54:16 26 4
gpt4 key购买 nike

我在 github 上有一个 git 仓库。

我想将存储库的主版本迁移到本地文件系统,并从此本地文件系统副本进行克隆。

我该怎么做?

最佳答案

首先,通过克隆您的 github 存储库来创建您的新存储库:

git clone --bare git@github.com:<User Name>/<Project Name>.git

如果您想删除您的 github 存储库,请转至 https://github.com/<User Name>/<Project Name>/edit .在页面底部,有删除存储库的链接。

然后设置要共享的新存储库:

http://www.google.com/search?q=serving+a+git+repository

最后,在 github 存储库的所有其他克隆上,更改原始 url:

git remote set-url origin <new url>

关于git - 将存储库从 github 迁移到本地文件系统?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2113518/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com