Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of the "remote name" when adding a remote to VSCode

In Visual Studio Code - I just chose to "add remote" so I can clone a repository and like every time, it asks me for a "Remote Name" I feel there is redundancy here and I don't know where this "Remote Name" is actually used. I feel like I'm at the doctors office filling in the date 27 times on 3 pages of paperwork.

  1. I've already had to create a filename for the folder in which I'm downloading the repository to,
  2. I've already named the repository on Github,
  3. and now I have to make a name for the remote.

What is the purpose of this "Remote Name"? What should I name it? Should I include information about the branch or something?

Thanks in advance for information about the best practice/workflow here, or anything my new programmer's mind doesn't yet grasp.

like image 694
Jeremy Irons Avatar asked Oct 26 '25 14:10

Jeremy Irons


1 Answers

The Git: Add Remote command is from VSCode 1.46 (Q2 2020), and is made to add remotes to existing local repository.

Asking for the Remote Name makes sense, since you are supposed to already have an existing local repository (possibly cloned from a remote one, referenced as "origin"): you might want another remote, named "upstream", to keep track of an original repository that you have forked.

Cloning a remote repository would be done with Git: Clone, which will automatically add the remote URL as "origin" for you, avoiding the redundant step of the "Remote Name" prompt.

like image 80
VonC Avatar answered Oct 29 '25 03:10

VonC