Stage 2 · Lesson 5 of 9
Branches and pull requests
A is a separate line of work. You create one with git switch -c add-login, make commits on it, and leave main (your project's main line) working while you experiment. A pull request on asks to merge that branch into main.
It shows the , the exact lines that changed, so someone can do a and comment line by line before the change goes in. Almost every software team works this way, so doing it on your own projects is real preparation. Use one branch per feature or fix.
Keep pull requests small enough to review in ten minutes, and describe what changed and how you tested it. Merging your own pull request still counts; getting a friend to review it is better.
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