【发布时间】:2013-12-21 19:58:12
【问题描述】:
此步骤返回致命错误。我们可以通过命令行创建存储库吗?我也安装了 gitbash。
D:\gitproject>git 初始化 在 D:/gitproject/.git/ 中初始化空的 Git 存储库 D:\gitproject>触摸自述文件 D:\gitproject>git 添加自述文件 D:\gitproject>git commit -m "第一次提交" [master (root-commit) b7f79a0] 第一次提交 1 个文件已更改,0 次插入 (+),0 次删除 (-) 创建模式 100644 自述文件 D:\gitproject>git 远程添加源 https://github.com/lucycloud/NewRepo.git D:\gitproject>git push origin master 认证OK 认证OK 远程:未找到存储库。 致命:找不到存储库“https://github.com/username/NewRepo.git/” D:\gitproject>git 远程添加源 https://github.com/username/NewRepo.git 致命:远程来源已经存在。 D:\gitproject>git push origin master 认证OK 认证OK 远程:未找到存储库。 致命:未找到存储库“https://github.com/lucycloud/NewRepo.git/”【问题讨论】:
-
你必须 1. 在 github 上创建 empty repo; 2.将远程添加到您的本地仓库; 3.git推送。您不能从本地计算机创建远程存储库。
-
如果读者没有注意到,您可以使用 GitHub API 从命令行创建远程 GitHub 存储库。请参阅引用的重复问题的答案。