プログラミング勉強日記
2021年2月11日
最初に初めてHerokuでデプロイしようとしたときに、以下のようなエラーが出た。これは、リモートリポジトリにHerokuが追加されていなかったため、リモートリポジトリを登録することで解決できた。
fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.
登録されているリポジトリの確認
$ git remote -v
登録する方法
$ git remote add heroku https://git.heroku.com/アプリ名.git
変更する方法
$ git remote set-url heroku https://git.heroku.com/アプリ名.git
削除する方法
$ git remote rm heroku