git - 上传本地仓库到 github.com

标签 git github

我有一个 git 存储库,它完全存在于我的 PC 本地。我想在 github.com 上创建它的远程克隆。怎么做到的?

最佳答案

看起来很基础的问题还是按照下面的步骤

第 1 步:您需要先创建 git hub 存储库

第 2 步:然后复制 git hub repo 的 URL

第 4 步:然后为 git hub 仓库添加远程(git remote add origin "copied repo URL")

第 3 步:然后克隆 repo(Redme 文件将被克隆)(git clone "copied repo URL")

第五步:然后添加文件(git add * or git add . or git add file name)

第六步:git commit -m "your message"

第七步:推送它(git push origin "branch name")

Login to git-hub and check you Repository

关于git - 上传本地仓库到 github.com,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51997057/

相关文章:

git - 如何在同一台机器上使用和克隆 github 和 aws (CodeCommit) 存储库?

android - GitHub项目未引入Android Studio

Git 不会在后续克隆上克隆所有分支?

git - 我无法在 jenkins 中连接 azure 存储库

github - Markdown 文件的 YAML header 在文档顶部生成奇怪的表格

linux - 如何在不运行 ssh-agent 的情况下将 GitHub 与 SSH 结合使用?

github - 如何访问 Github Wiki 分支

git - 如何查看特定版本的 Github 存储库中的代码?

git - Windows客户端的TortoiseGit和GitHub可以共存吗?

windows - Git vim 编辑器配置