I was trying to recover an old codebase. I could see that it had two remotes one of which was now rejecting pushes. So, I figured the remote must have changed. To verify, I needed to see how to find out the remote URL. I found there are three ways of doing it as follows:
- git remote show remote_name # this failed for me as the remote URL was unavailable
- git config --get remote.heroku.url # this solved my purpose
- git remote -v # simplest of all to remember