如何将克隆的 git 存储库上传到 github 上自己的 git 存储库?
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
的附加遥控器(您可以随意命名)指向 NewRepoURL。要 push(不是 upload),你分支到新的远程 do
git push newrepo master
我从 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
的附加遥控器(您可以随意命名)指向 NewRepoURL。要 push(不是 upload),你分支到新的远程 do
git push newrepo master