π³ Git Explained Like You're 5
Building AI systems and writing about how they actually work. Master of AI @ University of Technology Sydney. Previously B.Tech CS with focus on IoT. I believe the best way to learn is to explain. That's why I'm documenting tech concepts with simple analogies (@sreekarreddy.com). AWS Certified β’ Azure AI Certified β’ Neo4j Professional β’ Google Data Analytics When not coding: exploring Sydney, working on side projects, and teaching tech to anyone who'll listen.
A time machine for your code
Day 26 of 149
π Full deep-dive with code examples
The Time Machine
Imagine writing an essay and being able to:
- Save a snapshot every few minutes
- Go back to any previous version
- See exactly what changed between versions
- Try something risky and undo if it breaks
Git is a time machine for your code!
How It Works
You make "commits" - snapshots of your code at a moment in time.
Commit 1: "Started project"
Commit 2: "Added login page"
Commit 3: "Fixed bug in login"
Commit 4: "Added dashboard" β You are here
Messed up? Go back to Commit 3!
Key Commands
| Command | What it does |
git init | Start tracking a project |
git add | Stage files to save |
git commit | Save a snapshot |
git log | See history |
git checkout | Go back in time |
Branches
Work on features without breaking the main code:
main: ββββββββββ
\
feature: βββββββ
When feature is ready, merge it back!
In One Sentence
Git saves snapshots of your code so you can go back in time, experiment safely, and collaborate with others.
π Enjoying these? Follow for daily ELI5 explanations!
Making complex tech concepts simple, one day at a time.