sreenivas./courses
Git & GitHub for Beginners — all lessons
🎮

MODULE 02 · 8 MIN READ

Recap + practice

Your Day 2 commands

git branch <name>create a universe (just a label)
git switch <name>step into it · -c = create + step in
git merge <name>stand on the receiver, pull the giver in
git merge --abortpanic button — undo the merge
git branch -d <name>delete the label (commits stay)
git commit -am "msg"stage tracked files + commit, one move
git logsee the universes

Practice — match the graph

Below is a leveled playground: each level shows a target commit graph. Type real git commands in the terminal until yours matches it. Nothing can break — reset forgives everything.

🕹 GIT BRANCHING PLAYGROUND

0/7 levels ★

Level 1: First snapshots

commit

Warm-up. Grow main by two more commits. Any file names, any messages.

🎯 GOAL GRAPH

main ← HEAD

shape matters, not the exact messages or hashes

YOUR GRAPH · on branch main

a1b2cmain ← HEAD
playground terminal

type real git commands — this is a fresh, isolated repo per level.

$ 

Homework — 10 minutes

Create two branches, edit the same line differently on each, merge, resolve — solo, while it's fresh.

Tomorrow

Day 3: your code leaves the laptop 🌍 — remotes, GitHub, and your first pull request. See you there.