【发布时间】:2024-01-12 23:14:01
【问题描述】:
我在使用 Git 时遇到了这个奇怪的问题。这就是我所做的:
- 我在 VS Community 2017 中创建了一个新项目
- 通过 Git Bash,我在新创建的项目的根目录中执行了
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
所以远程源已经存在,但是找不到存储库。
我该如何解决这个问题?
【问题讨论】:
标签: git github git-branch git-bash