Skip to content

Instantly share code, notes, and snippets.

@noahd1
Created December 20, 2011 03:54
Show Gist options
  • Save noahd1/1500156 to your computer and use it in GitHub Desktop.
Save noahd1/1500156 to your computer and use it in GitHub Desktop.
def get_remote_repository():
git_command = ["git", "config", "--get", "remote.origin.url"]
popen = subprocess.Popen(git_command, stdout = subprocess.PIPE)
return popen.communicate()[0].strip()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment