Stage 2 · Lesson 6 of 8
clone, fetch, pull and push
A remote is another copy of the , usually on . origin is the default name for the one you cloned from. git clone copies a repository with its full history.
git fetch downloads new commits without touching your files. git pull fetches and then merges them into your current branch, and git push sends your commits up. git remote -v shows where each remote points.
A push is rejected when the remote has commits you do not have. Pull first, resolve any conflict, then push again. Never to a shared branch, because it overwrites other people's work.
Set up or a once, because GitHub does not accept your account password for Git operations.
A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it
Resources for this stage
Start with· follow one of these
- CourseFreeThe Missing Semester of Your CS Education
MIT · Beginner
MIT lectures on dev tools; the shell, shell tools and version control lectures are enough
- GitHub repoFreeGitHub Skills: Introduction to GitHub
GitHub · Beginner
Free one-hour exercise: branch, commit, open and merge a pull request