v9.5.x and earlier
running heroku apps:rename -a OLD_NAME NEW_NAME in a directory where a git remote exists for OLD_NAME causes it to be removed from the remotes instead of renamed.
Repro steps
- Add an app to the git remotes
heroku git:remote APP_NAME
- Verify the
heroku remote exists git remote -v
- Rename the app
heroku apps:rename -a OLD_NAME NEW_NAME
- Verify the
heroku remote was updated git remote -v
Expected behavior
The heroku remote is updated with the new app name
Actual behavior
The heroku remote is removed