$git log
commit e9b08e2b428f9dd58aa0b792ebeb29da4270dfab (HEAD -> master)
$git remote -v
origin https://github.com/Shell_learning (fetch)
origin https://github.com/Shell_learning (push)
$git branch -a
* master
$git push -u origin master
remote: Not Found
fatal: repository 'https://github.com/Shell_learning/' not found
$git remote add origin https://github.com/ekoopgj/Shell_learning
fatal: remote origin already exists.
#It is really strange that the repository already exists ,but I can't push my local update to remote branch.
我在github中创建了一个存储库,如下所示:
所以,请告诉我这是什么问题。
答案 0 :(得分:2)
您目前用于origin
遥控器的网址不正确。 GitHub存储库URL的格式应遵循https://github.com/username/repository.git
定义遥控器后,您无法使用git remote add
进行更改 - 您必须使用git remote set-url
。
此脚本应将origin
更新为正确的网址。
git remote set-url origin https://github.com/ekoopgj/Shell_learning.git
答案 1 :(得分:1)
您需要将.git
附加到存储库地址:
git remote set-url origin https://github.com/ekoopgj/Shell_learning.git