Command

Git Add Remote Command

The Git command to add remote is git remote add origin <url>.

Quick Answer

Command
git remote add origin <url>
GitCommand

Add Remote

Type this command
git remote add origin <url>

Connects a remote repository under a name.

Learn More

How to add remote in Git

  1. Open the terminal or command interface for Git.
  2. Type git remote add origin <url>, replace any placeholders, and run it.

Git Add Remote Command

Run git remote add origin <url>.

Related Commands

Frequently asked questions

What is the Git command to add remote?

Run git remote add origin <url>.

Where do I type this Git command?

Type it in the terminal or command-line interface used by Git.

Does this Git command work on Mac and Windows?

Yes. The command text is the same on both platforms when the tool is installed.

Official source · How we verify