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

$ git switch -c idea

Switched to a new branch 'idea'

MODULE 02 · 5 MIN READ

Create a universe and step in

git branch idea creates the universe but leaves you standing on main — like building a door without walking through it. git switch idea walks through.

git bash

$ git branch idea

$ git branch

idea

* main

$ git switch idea

Switched to branch 'idea'

Try it — right here

Watch the graph above the terminal grow a second colored lane the moment you switch.

COMMIT GRAPH · on branch main

a1b2cmain ← HEAD
practice terminal — you cannot break it

a tiny simulated laptop — your Day 1 repo is preloaded.

$ 

// try: git branch idea, then: git switch idea