将新的本地项目添加到新的远程存储库
Issue adding new local project to a new remote repository
我在使用 Git 时遇到了这个奇怪的问题。这就是我所做的:
- 我在 VS Community 2017 中创建了一个新项目
- 从GitBash开始,我在新建项目的根目录下
git init
- 我添加了新文件并做了一些编码
- 我在我的 github 帐户
上创建了一个新存储库 MVVM_Template(与本地项目名称相同)
- 我按照 Adding an existing project to GitHub using the command line
中的说明进行操作
结果:
Me@MyPC MINGW64 ~/source/repos/MVVM_Template (master)
$ git remote add origin https://github.com/MeOnGithub/MVVM_Template.git
fatal: remote origin already exists.
Me@MyPC MINGW64 ~/source/repos/MVVM_Template (master)
$ git push -u origin master
remote: Repository not found.
fatal: repository 'https://github.com/MeOnGithub/MVVM-Template.git/' not found
所以远程来源已经存在,但是没有找到存储库。
我该如何解决这个问题?
我想你拼错了什么?看起来实际存储库的名称与您为遥控器设置的名称不同。是 MVVM_Template
还是 MVVM-Template
?
我在使用 Git 时遇到了这个奇怪的问题。这就是我所做的:
- 我在 VS Community 2017 中创建了一个新项目
- 从GitBash开始,我在新建项目的根目录下
git init
- 我添加了新文件并做了一些编码
- 我在我的 github 帐户 上创建了一个新存储库 MVVM_Template(与本地项目名称相同)
- 我按照 Adding an existing project to GitHub using the command line 中的说明进行操作
结果:
Me@MyPC MINGW64 ~/source/repos/MVVM_Template (master)
$ git remote add origin https://github.com/MeOnGithub/MVVM_Template.git
fatal: remote origin already exists.
Me@MyPC MINGW64 ~/source/repos/MVVM_Template (master)
$ git push -u origin master
remote: Repository not found.
fatal: repository 'https://github.com/MeOnGithub/MVVM-Template.git/' not found
所以远程来源已经存在,但是没有找到存储库。
我该如何解决这个问题?
我想你拼错了什么?看起来实际存储库的名称与您为遥控器设置的名称不同。是 MVVM_Template
还是 MVVM-Template
?