DEV Community

Maitreyee Aggarwal
Maitreyee Aggarwal

Posted on

First Push to GitHub

Today was different.
I didn’t write much Python. Instead, I learned something that every developer whispers about: Git.
What I Did:

  1. Created a new repository on GitHub
  2. Initialized Git in my local project folder (git init)
  3. Added files (git add .)
  4. Committed them (git commit -m "first commit")
  5. Linked remote with my repo (git remote add origin …)
  6. Pushed my code (git push -u origin main)

And suddenly… my code was on the internet.
What all Went Wrong, :/ Of course, it wasn’t smooth:

First error: “remote already exists”
Second error: “fetch first before pushing”
Final message: “everything up to date” (which, was a good thing).

Why Git Matters (Even for a Beginner)

I realized:

It’s not just about saving code.
It’s about tracking history, collaborating, and never losing progress.

Even if I’m coding solo right now, I’m building the habit early.

Day 5 wasn’t about writing a new Python function.
It was about learning how to protect and share the ones I already wrote.
Tomorrow: Back to Python, but now with the confidence that my work is safely versioned.

Top comments (0)