8

I can get the repository path running the following command in the repository folder (like it was suggested here):

git config --get remote.origin.url

How can I get the git repository url using an absolute path?

Suppose that I am in another folder and I want to get the repository url from another folder, using an absolute path.

I tried this, but doesn't work.

git config --get remote.origin.url --path /home/username/myFolder
Community
  • 1
  • 1
Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474

1 Answers1

9
git --git-dir=/home/username/myFolder/.git config --get remote.origin.url
Ionică Bizău
  • 109,027
  • 88
  • 289
  • 474
forivall
  • 9,504
  • 2
  • 33
  • 58