Finding out the name of the original repository you cloned from in Git

Toby picture Toby · Nov 2, 2010 · Viewed 119.8k times · Source

When you do your first clone using the syntax

git clone username@server:gitRepo.git

Is it possible using your local repository to find the name of that initial clone?

(So in the above example, find gitRepo.git.)

Answer

Straff picture Straff · Jun 24, 2016
git config --get remote.origin.url