Stage 2 · Lesson 4 of 9
Remotes: push, fetch and pull
The copy of your project on your laptop and the copy on are separate until you sync them. The copy on GitHub is called the remote. git push sends your to the remote.
git fetch downloads new commits from it without changing your files. git pull does a fetch and then merges those commits into the you are on. Pulling while you have uncommitted changes often causes confusion, and git stash lets you set that work aside first.
To start from a project already on GitHub, it. To connect a folder you already have, run git remote add origin followed by the 's URL. Once this works, every program you write can live on GitHub from its first day, which is the point of this stage.
A question to check yourself, an AI practice session and 2 cheat sheet entries come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- GitHub repoFreeGitHub Skills: Introduction to GitHub
GitHub · Beginner
Free hands-on exercise: branch, commit, open and merge a pull request in about an hour
- CourseFreeThe Missing Semester of Your CS Education
MIT · Beginner
MIT lectures on the tools degrees skip; the shell and version control lectures are enough here
Practise
Keep handy
Also worth your time
How to choose, structure and present projects so a reviewer sees your best work first