How can I retrieve the remote Git address of a repository?
I tried git remote, but that just lists the branches.
If you have the name of the remote, you will be able with git 2.7 (Q4 2015), to use the new git remote get-url command:
git remote get-url origin (nice pendant of git remote set-url origin <newurl>)
See commit 96f78d3 (16 Sep 2015) by Ben Boeckel (mathstuf).
(Merged by Junio C Hamano -- gitster -- in commit e437cbd, 05 Oct 2015)
remote: add get-url subcommand
Expanding
insteadOfis a part ofls-remote --urland there is no way to expandpushInsteadOfas well.
Add aget-urlsubcommand to be able to query both as well as a way to get all configured urls.
git remote -v