将资源库克隆到GitHub中

将资源库克隆到GitHub中

问题描述:

我一直在本地使用git,并且拥有一个包含完整更改历史记录等的私有存储库。我现在想要在GitHub上分享这个,所以我需要从本地仓库克隆到新的GitHub仓库。我找不到任何方法来做到这一点。我怎样才能让我的所有的历史最高到GitHub上?

I have been using git locally for while a now and have a private repository with complete change history etc. I now want to share this on GitHub, so I need to clone from my local repo into a new GitHub repo. I cannot find any way to do this. How can I get all my history up onto GitHub?

您不需要 克隆到GitHub上。您只需在GitHub上创建一个存储库并在其中进行更改:

You don't need to "clone onto GitHub". You just have to create a repository on GitHub and push your changes there:

$ cd your_local_repo
$ git remote add origin git@github.com:USERNAME/REPO_NAME.git
$ git push origin master