how to get original url of git repository

How to get original url of git repository

If you want only the remote URL, or referential integrity has been broken:

1
$ git config --get remote.origin.url

If you require full output or referential integrity is intact:

1
$ git remote show origin

When using git clone the default name for the source of the clone is “origin”. Using git remote show will display the information about this remote name. The first few lines should show:

1
2
3
4
5
6
7
8
9
10
11
12
MacBookPro:iasl.git michael$ git remote show origin
* remote origin
Fetch URL: https://github.com/RehabMan/Intel-iasl.git
Push URL: https://github.com/RehabMan/Intel-iasl.git
HEAD branch: master
Remote branches:
latest_broken tracked
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)