40

ever `git push` and have an "oh shit" moment?

Comments
  • 8
    I think we’ve all been there.
    That’s what code reviews are for to save our ass.
  • 5
    Yep, wrong repo, about a year ago 🤦‍♂️🌋
  • 2
    Every time
  • 5
    git push force to master, done it once while I was an intern, it definitely was “oh shit” moment 😐
  • 2
    Been there, done that. Definitely an “oh shit” moment :(
  • 2
    been there done that , wasted half day to clean off the shit
  • 3
    Yes. And then I learned how to revert.
  • 3
    Yep. Wrong branch. That's how I learned to force push.
  • 2
    Yep. I force pushed to a wrong remote branch. That didn't exactly make my day
  • 1
    Don't wanna play the smartass here as I'm actually a person who ran "sudo rm -rf *" in his root directory once :-| but whenever you use --force on ANYTHING, read that fucking line three times. Think about what could be wrong, and check those things. Possibly even let a colleague look over it in some scenarios (would be overkill for a git push but there's no shame in letting someone check your dd command).

    Only after doing all of this, you're allowed to run that command. Follow this strategy and you'll be good in the future.
Your Job Suck?
Get a Better Job
Add Comment