L
8

My code got wiped because I misunderstood git push, and now I'm spooked.

I mean, if you're new to coding, double-check your git commands before hitting enter because losing hours of work is no joke.
3 comments

Log in to join the discussion

Log In
3 Comments
anderson.cora
Ugh, that's the worst feeling. I once did a git reset on the wrong branch and deleted like two days of experimental changes. Had to manually re-create so many weird little fixes from memory, it was brutal.
2
shah.shane
shah.shane1mo ago
Read a blog post where someone suggested making a habit of typing "git status" before any destructive command. It forces you to double-check which branch you're on and what's staged. That extra second could save hours of rework, especially when you're tired. Have you tried adding any checks like that to your routine?
7
the_jesse
the_jesse1mo ago
Git can be really tricky when you're starting out because the commands don't always do what you expect. I read once how push and fetch terms come from old computer ideas, which might explain why they're confusing. Well, that's a side note, but setting up a backup branch before big changes saved me once. You could make a habit of that, so even if you mess up, your work isn't totally gone. It's like a safety net that lets you learn without the constant fear of losing everything.
1