Clone and Configure Git Remotes
A remote is a named connection
A bare repository has no ordinary checked-out working tree. In the lab, shared.git is the common repository and Alice and Bob have separate working copies. A clone normally copies reachable history and configures a remote named origin; the name is a convention, not a server. Run in the lab root before Bob is cloned.
Both fetch and push locations point to shared.git; Bob has the initial committed notes.
Inspect and change local configuration
Remote names map to locations. HTTPS and SSH are common network transports; a local path works offline. Never include a token in a URL. Only use the lab path below; changing a URL does not move the actual remote repository.
git remote add mirror ../shared.gitgit remote set-url mirror ../shared.gitgit remote get-url mirrorgit remote remove mirrorThe extra alias is removed; origin remains. Shallow clones limit history, partial clones may defer objects, and single-branch clones limit branch selection. None guarantees a complete backup.
Practice and check
Use the Chapter 10 lab guide. Before each command predict which local or remote reference changes, then compare the observed result. Clone a local bare repository and inspect remote mapping.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Clone and Configure Git Remotes — knowledge check
Check understanding of remote repository behavior.
What does origin name?
What does a bare repository normally lack?
What does remote set-url change?
Which clone option limits history depth?
Which command displays fetch and push URLs?