Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Git Commands You Need to Know ~~ Ohshitgit.com ~~ A lifesaver for Git users

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:
Code
# undo the last commit, but leave the changes available
git reset HEAD~ --soft



And of course, if you really need a laugh & the nuclear option:

[Image: ymMhteZ.png]
Haha good find! Good git refresher with an awesome sense of humor.
Actually useful commands. Nice find.

This reminds me of when you accidently push sensitive data to github, and have to revert🤯
(Feb 16, 2024 12:06 AM)HALx86 Wrote:  Haha good find! Good git refresher with an awesome sense of humor.

Yeah found this a couple years ago almost, it's honestly a great one.

(Feb 16, 2024 06:29 AM)based‌ Wrote:  Actually useful commands. Nice find.

This reminds me of when you accidently push sensitive data to github, and have to revert🤯

Haha yeah that's no good.
.gitignore for the win !

```

Also, if you need a SFW version to share, here you go - https://dangitgit.com/en
(Feb 16, 2024 06:33 AM)Hackers Wrote:  Haha yeah that's no good.
.gitignore for the win !

```

Also, if you need a SFW version to share, here you go - https://dangitgit.com/en

Lmfao yeah, I use https://www.toptal.com/developers/gitignore for generating gitignores.
But sometimes if its late etc... you can forget.
At some point or an other you will need this link to save your life. I know I have plenty of times gotten into a very sticky situation with git.
(Feb 21, 2024 01:24 AM)Dirty Wrote:  At some point or an other you will need this link to save your life. I know I have plenty of times gotten into a very sticky situation with git.

heh, yep! I recommend this link to everyone, it's very useful for those moments.
I don't have too many crises but from time to time I need some git refreshers


Possibly Related Threads...
Thread / Author Replies Views Last Post
by KlonopinApr 20, 2025 06:00 PM 23 1,086 Apr 20, 2025 06:00 PM
Last Post: MavenGradle
by HackersJun 4, 2024 11:18 AM 12 312 Jun 4, 2024 11:18 AM
Last Post: Hackers
by HackersMay 29, 2024 08:26 AM 2 299 May 29, 2024 08:26 AM
Last Post: Hackers