Home > database >  How to know the URL of my local git repo?
How to know the URL of my local git repo?

Time:10-12

I've just created a new git repo on my remote server using git init command.

And now, i want to add that repo on my local pc using git remote add <alias> <remote_repo_url> command.

My problem is, i don't know what is my remote_repo_url. Someone mentions about referring in .git/config file but nothing in it seems like a URL:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true

CodePudding user response:

You add it from github project repo it's something like that https://github.com/yourgithubName/yourRepo this remote Url, or you can use ssh URL by creating ssh key to do so.

CodePudding user response:

You'll need to host the repository somewhere. Most people use Github, or BitBucket, or GitLabs. So you'll have to create a repository there (either manually or through the CLI), and then add a remote URL to your current git repository.

But to answer your specific question, to know the URL of your remotes:

git remote -v

That's the answer, but not the answer to what you're really looking for.

  •  Tags:  
  • git
  • Related