Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a remote URI

Tags:

git

I'd like to get an address of my remote repository, ideally one line only. Ideal would be something like

$ git remote show origin fetch_url --some-params-im-not-aware-of
git://github.com/ask/celery.git
like image 926
Almad Avatar asked Dec 21 '09 10:12

Almad


2 Answers

Simple: git config remote.origin.url

like image 102
Tobu Avatar answered Oct 28 '22 08:10

Tobu


A simple way of showing the URLs that each of your remotes refers to is git remote -v. For example:

$ git remote -v
origin git://git.kernel.org/pub/scm/git/git.git
like image 42
Mark Longair Avatar answered Oct 28 '22 08:10

Mark Longair