What is Origin

origin is the default name for the remote created when you git clone a repository. It points to the URL you cloned from.

How it works

When you run git clone [email protected]:user/repo.git, Git automatically creates a remote named origin with that URL. Remote-tracking branches appear as origin/main, origin/feature, etc.

The name origin is a convention — there is nothing special about it in Git's internals. You could rename it:

git remote rename origin github

Or clone with a different name:

git clone -o upstream [email protected]:original/repo.git

In fork-based workflows, developers commonly use origin for their personal fork and add a second remote called upstream for the original repository.

Why it matters

origin is the remote you interact with most often — git push origin main, git fetch origin, git pull. Knowing it is just a name for a URL demystifies commands that reference it.

See How Git Branching Works for how remotes and remote-tracking branches work.