Method: Chandler::Git#origin_remote

Defined in:
lib/chandler/git.rb

#origin_remoteObject

Uses ‘git remote -v` to list the remotes and returns the URL of the first one labeled “origin”.

origin_remote # => “[email protected]:mattbrictson/chandler.git”



40
41
42
43
# File 'lib/chandler/git.rb', line 40

def origin_remote
  origin = git("remote", "-v").lines.grep(/^origin\s/).first
  origin && origin.split[1]
end