Interview Q&A / Git & GitHub

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What is origin in Git, and can a repo have more than one remote?

SHORT ANSWER

origin is the default name Git gives to the remote you cloned from. It is just a nickname for a URL, and a repository can have many remotes, such as origin and upstream for a fork.

Explain it simply

origin is a contact name saved against a phone number. You could have saved it as 'Home'; Git simply uses origin by default when you clone.

A remote is a named URL. git remote -v lists them. A second one is common when you work on a fork: origin is your copy and upstream is the original project. You then git fetch upstream to receive its changes. Remotes are added with git remote add name url and renamed or removed with git remote rename and git remote remove.

Example

bash
git remote -v
# origin    https://github.com/me/aitapri.git (fetch)
git remote add upstream https://github.com/team/aitapri.git
git fetch upstream
git merge upstream/main

What to say in the interview

"origin is the default alias for the remote URL I cloned from. A repository can have several remotes, for instance origin for my fork and upstream for the original repository, and I fetch from each by name."

#git#remote#origin

Related questions

Practise more Git & GitHub questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Git & GitHub quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.