我知道已经提出了类似的问题.
但是,我认为我的问题是由于我之前犯的错误,因此是不同的:让我解释一下.
一切顺利,我可以:
git add . 我本地存储库中的所有文件.git commit -m "message here" 添加消息到我的提交.git push origin master 将我的文件上传到GitHub.git push heroku master 将我的文件上传到Heroku.但是,在某些时候,我在本地创建了一个新的分支add-calendar-model,以防应用程序开发的后续步骤向南...
......这正是发生的事情.
然而,尽管进行了许多尝试,但我没有设法从master分支到我的本地存储库获取初始代码 - 即我创建新分支之前的代码.
所以,我决定从GitHub 手动删除本地存储库和git clone我的master分支中的所有文件.
这样,我恢复了所有文件,但现在,我无法再将其推送到远程存储库.
任何时候我尝试运行git push origin add-calendar-model或git push 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 …Run Code Online (Sandbox Code Playgroud)