From Confusion to Confidence — My Git & GitHub Breakthrough

There’s a point in every self-taught developer’s journey where things just start to click.

For me, one of those moments happened recently — I finally understood how to properly use Git and GitHub. It might sound simple, but trust me, when you're learning solo, even something like pushing your changes to GitHub can feel like a puzzle.


🧩 The Confusion

Like many beginners, I used to think:

“Just make changes and run git push — that should be enough, right?”

Wrong. I kept running into errors like:

  • fatal: not a git repository

  • Updates were rejected because the remote contains work that you do not have locally

  • non-fast-forward errors

Every time something broke, I felt stuck and overwhelmed. But instead of quitting, I decided to go deeper and figure it out.


What I Learned: The Proper Git Workflow

After some trial, error, and patient debugging — it finally made sense.

Here's the correct flow for pushing changes from your local project to GitHub:

Go to current location: cd your/project/directory #go to current directory

Check status: git status

Add the files: git add .

Commit changes: git commit -m "Meaningful message"

(Optional): git pull origin main --allow-unrelated-histories # if needed

Push to github: git push


💭 Key Takeaways

  • git push only pushes committed changes, not just saved or staged files.

  • If the remote branch has changes you don't have, Git will reject your push. In that case, a git pull is necessary to sync before pushing again.

  • Errors are not dead ends — they are clues to understanding how tools work under the hood.


📚 Why This Meant So Much

This might seem like a small thing, but it's not just about the command line.

It’s about:

  • Problem-solving

  • Not giving up

  • Understanding a core developer tool that you’ll use every single day

That’s why this moment felt powerful.


💬 Final Thoughts

If you’re a beginner struggling with Git — you’re not alone. It will click eventually. Don’t be afraid to experiment and fail a little — it’s part of the process.

Every time you fix an error or figure something out, you’re building real developer muscle 💪

Let’s grow together!

0
Subscribe to my newsletter

Read articles from Deactivated User directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Deactivated User
Deactivated User