[英]How to upload a cloned git repository to an own git repository on github?
我已经从github克隆了一个项目。 现在,我想将其上传到我在github上的私有存储库中进行处理。 但是克隆的存储库在原始密钥中具有克隆项目的值。 将此项目上传到我自己的私有存储库的最佳实践是什么? 我已经阅读了git文档的德语版( https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes ),但尚未找到解决方案。
您可以按照以下步骤进行操作
git remote -v
git remote remove origin
git remote -v //to check if it was remove
转到Github,创建一个新的存储库。
git remote add origin <the new repository>
git remote -v
用命令
git remote add newrepo NewRepoURL
您将有一个newrepo
名为newrepo
远程遥控器(您可以使用任何方式命名)。 要推送 (而不是上载 ),请转到新的遥控器上
git push newrepo master
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.