Get the latest tech news

Oh Shit, Git?


s hard: screwing up is easy, and figuring out how to fix your mistakes is fucking impossible. Git documentation has this chicken and egg problem where you can't search for how to get yourself out of a mess, unless you already know the name of the thing you need to know about in order to fix your problem.

Git is hard: screwing up is easy, and figuring out how to fix your mistakes is fucking impossible. Note: this doesn't work if you've already pushed the commit to a public/shared branch, and if you tried other things first, you might need to git reset HEAD@{number-of-commits-back} instead of HEAD~. And yes, there are other ways to do these same things with more theoretical purity or whatever, but I've come to these steps through trial and error and lots of swearing and table flipping, and I had this crazy idea to share them with a healthy dose of levity and profanity.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of shit

shit

Photo of Git

Git

Related news:

News photo

Git 2.48 Released With Initial Support For The Meson Build System

News photo

Colliding with the SHA prefix of Linux's initial Git commit

News photo

Cook: Colliding with the SHA prefix of Linux's initial Git commit