If the remote is defined in .git/config, you can avoid pinging the remote server with git remote.
if git remote | grep -e "^faraway$" > /dev/null; then ... fi
The ^ and $ prevent matching similar names like longagoandfaraway.