# File lib/heroku/command/base.rb, line 177 def git_remotes(base_dir=Dir.pwd) remotes = {} original_dir = Dir.pwd Dir.chdir(base_dir) git("remote -v").split("\n").each do |remote| name, url, method = remote.split(/\s/) if url =~ /^git@#{heroku.host}:([\w\d-]+)\.git$/ remotes[name] = $1 end end Dir.chdir(original_dir) remotes end