Tools

GitHub and Version Control

Jan 25, 2026 4 min read

"My code was working 5 minutes ago!" We've all been there. Version control is the time machine for developers.

Why Git?

Git allows you to track every change in your code. You can revert to previous versions, create branches to test new features, and collaborate with others without overwriting their work.

Essential Commands

Here are the commands I use every day in my terminal.

Terminal / Bash
# 1. Start a new repository
git init
# 2. Stage changes
git add .
# 3. Save changes
git commit -m "Initial commit"
# 4. Upload to GitHub
git push origin main