Cloning a Real, Existing Project
git clone ~/recipes-origin.git ~/team-recipes
A genuine full copy: every commit, every branch the remote knows about, arrives in one step — not just whatever master happens to contain.
Which Branches Are Actually Local?
cd ~/team-recipes && git branch -a
Only master gets a real local branch automatically. feature/dessert-menu and hotfix/soup-typo exist as real remote-tracking references (remotes/origin/...) — visible, inspectable, but not yet something you can commit onto directly.
Mapping the Real History
git log --oneline --all --decorate --graph
--all shows every branch's real history at once, not just the checked-out one — the single most useful first command in any unfamiliar repository.
Where You Actually Are
cat .git/HEAD
git rev-parse master origin/master
Immediately after a fresh clone, master and origin/master genuinely point at the exact same commit — you are, for this one moment, perfectly caught up.
This is a genuinely different starting point than every earlier lesson: instead of continuing your own local ~/recipes, you clone the team's shared repository fresh, exactly as any new teammate would on their first day. Other real contributors have already been at work — real branches, real commits, real feature work in progress.
Before writing a single line, the real, disciplined move is to map out what you actually have: which branches exist only on the remote, what HEAD is pointing to, and how your local master compares to origin/master. git log --all --graph turns a confusing pile of unfamiliar history into a real, readable picture in one command.
Remote-tracking branch
A real, local reference (like origin/feature-x) recording a branch's state on the remote, created automatically for every branch a clone or fetch discovers. Confirmed directly in this lab: feature/dessert-menu and hotfix/soup-typo appeared as remotes/origin/... entries, with no local branch of the same name yet.
git log --all
Shows history for every ref git knows about — every local branch, every remote-tracking branch — rather than only the currently checked-out one. Confirmed directly in this lab revealing two entirely separate lines of work invisible to a plain git log.
Takeaways
- git clone brings every branch's history at once — local branches only exist for the default branch, everything else becomes a remote-tracking reference
- git branch -a genuinely distinguishes local branches from remote-only ones in one listing
- git log --oneline --all --decorate --graph is the real, fastest way to understand an unfamiliar repository's actual shape
- Right after cloning, a branch and its remote-tracking counterpart are always perfectly in sync — a real baseline worth remembering