Git push: "fatal 'origin' does not appear to be a git repository - fatal Could not read from remote repository."

  • 5,000
  • Tác giả: admin
  • Ngày đăng:
  • Lượt xem: 5
  • Tình trạng: Còn hàng

I know similar questions have already been asked.

But, I believe my issue is due to lớn a mistake I have previously made and therefore is different: let bu explain.

Everything was working smoothly, as I could:

  • git add . all the files from my local repository.
  • git commit -m "message here" to lớn add messages to lớn my commits.
  • git push origin master to lớn upload my files to lớn GitHub.
  • git push heroku master to lớn upload my files to lớn Heroku.

However, at some point, I created a new branch locally called add-calendar-model in case next steps of the phầm mềm development would go south...

... which is exactly what happened.

However, despite many attempts, I did not manage to lớn get the initial code — i.e. the code from before I created the new branch — from the master branch to lớn my local repository.

So, I decided to lớn manually delete all the files from my local repository and git clone my master branch from GitHub.

This way, I got all my files back, but now, I cannot push any more to lớn the remote repository.

Any time I try to lớn lập cập git push origin add-calendar-model or git push origin master, I get the following error:

fatal: 'origin' does not appear to lớn be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I am not very comfortable with Git and GitHub, as you may have guessed by now, and I have to lớn admit that I have no clue about how to lớn fix this.

Any idea?