Remote Repositories

another copy at an address, your bookmarks of it, and the mail rules between

$ git remote -v
origin  ../bureau-central.git (fetch)
origin  ../bureau-central.git (push)
the address book - executed

A remote is a saved, named address entry pointing at another copy of your repository. origin is only the default name clone picks - one line in your config, nothing more. The address can be a folder or a URL; the mail works the same.

$ git push -u origin main
To ../bureau-central.git
 ! [rejected]        main -> main (fetch first)
  ... (error + hint lines trimmed)
refusal = protection, never punishment

The mail rule: an ordinary git push is accepted only when the remote branch can slide FORWARD to your commit (policy walls - hooks, protected branches - can refuse any push; a different gate). Maria pushed without receiving first, while the central copy already held a commit it had never seen:

arrived, not applied - the bookmark twin
arrived, not applied - the bookmark twin

git fetch downloads their new commits and updates your remote-tracking ref origin/main - the faded bookmark twin behind your own folder (after a remote rewrite it can even move backward). Your branch, your files, your desk: untouched. Fetch is the LOOK move.

$ git pull
  ...
Merge made by the 'ort' strategy.
 focaccia.md | 1 +
  ...
ort = git's merge engine

git pull is fetch plus integrating into the branch you stand on - by merge, rebase, or fast-forward-only, per your configuration. Maria pulled with the merge strategy and filed the mail into her own timeline:

line

Every behind/ahead message is measured between two LOCAL pointers - your branch and your bookmark. No network is consulted, so the numbers are only as fresh as your last fetch. Her teammate, after fetching while the central copy was ahead:

main $ git status
  ...
Your branch is behind 'origin/main' by 1 commit, and can be fast-forwarded.
the LOOK move, at the moment of measuring
the LOOK move, at the moment of measuring

The habit that keeps the numbers honest: git fetch, then read them - the mail arrives on the bookmark, your desk holds still, and behind/ahead tells the truth again.

The professional rhythm is fetch first, look, then integrate: read what arrived on your own clock, and file it in when you are ready. The next chapter runs the full collaboration loop on these rails - pushing branches, updating them under review, and the lease that makes a rewrite honest.