There are several ways to get the link to a GIT repository from the directory where the repository was previously cloned. Let's explore each of them:
- Command
git config --get remote.origin.url
https://github.com/geekrainian/next-app.git
- Command
git remote -v
origin https://github.com/geekrainian/next-app.git (fetch)
origin https://github.com/geekrainian/next-app.git (push)
- Command
git remote show origin
* remote origin
Fetch URL: https://github.com/geekrainian/next-app.git
Push URL: https://github.com/geekrainian/next-app.git
HEAD branch: master
- Check the hidden
.git/config
file manually or use the commandcat .git/config
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
[remote "origin"]
url = https://github.com/geekrainian/next-app.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
Enjoyed the story? 🤔
If this article was useful for you, please consider supporting me by making a donation.