GIT / A CONCEPT NOTE
Remotes & Tracking
your copy vs everyone's copy
Overview · mechanism
pitfall · examples
01 / THE SHORT VERSION
The idea in a few sentences.
A remote is a copy of your project hosted on a shared server (GitHub/GitLab). Local tracking branches keep track of remote branch pointers (origin/main) to synchronize changes.
02 / FOLLOW THE MECHANISM
How collaborative sync flows
Git fetch
pulls down remote updates, updating origin/main pointer.
Diff status
checks: is local main ahead or behind origin/main?
Git pull
fetches remote updates and merges them into your active branch.
Git push
pushes local commits up to remote, advancing remote pointers.
04 / COMMAND NOTES
Read the command, then the result.
Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.
list all configured remote repositories
git remote -vdownload remote histories without changing local branch files
git fetch --all05 / CHECK YOURSELF
Could you explain Remotes & Tracking to a teammate?
Try it out loud in two sentences: what it is, and the one detail that changes the picture. If you stall, the gap is the part to reread.
Up next in Git & collaborationMerge Conflictswhen two truths collide