Lesson 1 · Unit 04
Remotes
origin, origin/main, fetch, pull and push
What you practise
origin, remote-tracking branches likeorigin/main,fetchvspull, ahead and behind, whatpushactually sends
Try a question from this lesson
Pick one
You clone a repository, then board a plane with no internet. Which of these still works?
Correct answer
git log through the full history
Why
A clone is a complete copy of the object database: every commit, tree and blob. Log, diff, branch, commit and merge are all local. Only fetch, pull and push talk to the other repository.
The idea
Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.
Concept
Two databases
Your repository and the server's are separate databases. A remote is a nickname for the other one's address; git clone calls it origin.
origin/main is your copy's memory of where main was on origin the last time you talked to it. It moves only when you fetch, pull or push.
origin (server) your clone
main -> two origin/main -> one
main -> one
until you fetch, you remember "one"11 more exercises in the app
- 4× multiple choice
- 3× type the answer
- 1× fill the blanks
- 1× true or false
- 1× order the lines
- 1× match the pairs
Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.