git config --get remote.origin.url

Category: Git - Core

git config --get remote.origin.url

Read a single config value

Prints the value of the named key, here the URL of the origin remote. It exits non-zero if the key is unset, which scripts can detect. The general form works for any setting name.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.