Menu
Coddy logo textTech

Add A Remote

Part of the Version Control section of Coddy's Terminal journey — lesson 47 of 58.

To register a remote in your repo, use git remote add with a name and a URL:

git remote add origin https://github.com/you/project.git

This stores the mapping inside .git/config. From now on, commands like git push origin or git fetch origin know which URL to talk to.

You can list remotes (and their URLs) at any time with:

git remote -v

The -v stands for verbose. Without it, git remote just prints the names. With it, you see fetch and push URLs side by side.

For most simple setups the fetch and push URLs are the same.

challenge icon

Challenge

Beginner

The folder is a fresh repo. Add a remote called origin pointing to https://github.com/coddy/demo.git.

Then run git remote -v.

Cheat sheet

Add a remote with a name and URL:

git remote add origin https://github.com/you/project.git

List remotes and their URLs:

git remote -v

Try it yourself

Terminal
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Version Control