我无法通过remote
命令远程创建源代码库:
$ git remote add origin https://github.com/LongKnight/git-basics.git
fatal: remote origin already exists.
为了解决错误,我尝试了这个:$ git remote -v origin
$ git remote -v show origin
我的本地代码库没有将文件上传到远程服务器:
$ git push -u origin master
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
每个代码库都有自己的源吗?
解决方案:我之前使用的是 Github 或者 Git Shell 自带的 Powershell 进行教程,一旦我切换到 Git Bash ,它就可以正常工作了。