git cloneをやり直したり、別環境だったりでherokuコマンドを使う時は以下のように--app
オプションでアプリ名を指定する必要がある
$ heroku log --app yourappname
いちいち指定するのは面倒なのでそれを省略するやり方
手順 🔗
$ heroku git:remote -app yourappname
.git/configに設定が追加されるので、都度アプリ名を指定しなくてもよくなる
[remote "heroku"]
url = https://git.heroku.com/yourappname.git
fetch = +refs/heads/*:refs/remotes/heroku/*