remote-tracking branch

A local, read-only record of where a branch on a remote pointed the last time you talked to it, such as origin/main.

In more detail

It lives under .git/refs/remotes and moves only when you fetch, pull or push, never when you commit. git status compares your branch with it to say you are ahead or behind, which is why it only notices new remote work after a fetch. git branch -r lists them.

Example

git log --oneline origin/main

Related terms

Taught in

References