Feb 15, 2024 09:52 PM
(This post was last modified: Feb 16, 2024 06:34 AM by Hackers.)
I am a huge fan of this comedic take on git commands that will save you if you are in a bind.
~~~
Oh shit, I did something terribly wrong, please tell me git has a magic time machine!?!
Git is 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.
This is one of their opening lines & it's very accurate. If you messed up, head to the site:
NSFW: https://ohshitgit.com
SFW: https://dangitgit.com
*No I am not affiliated with this, it just has saved my ass numerous times when I forget a lifesaving command. I always share it with the devs.
Here is an example of something that might be helpful, for undoing a commit you made but without losing those changes:
And of course, if you really need a laugh & the nuclear option:
~~~
Oh shit, I did something terribly wrong, please tell me git has a magic time machine!?!
Git is 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.
This is one of their opening lines & it's very accurate. If you messed up, head to the site:
NSFW: https://ohshitgit.com
SFW: https://dangitgit.com
*No I am not affiliated with this, it just has saved my ass numerous times when I forget a lifesaving command. I always share it with the devs.
Here is an example of something that might be helpful, for undoing a commit you made but without losing those changes:
Code
# undo the last commit, but leave the changes available
git reset HEAD~ --softAnd of course, if you really need a laugh & the nuclear option:



