this post was submitted on 09 Nov 2023
33 points (97.1% liked)

Programmer Humor

32247 readers
484 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 14 comments
sorted by: hot top controversial new old
[–] DarkwinDuck@feddit.de 4 points 11 months ago (1 children)

So you're going to git gud?

[–] brothershamus@kbin.social 1 points 11 months ago
[–] lseif@sopuli.xyz 2 points 11 months ago (1 children)

if u ever get a tricky merge conflict, just git push --force. this automatically works out the right code to keep (your own)

[–] erogenouswarzone@lemmy.ml 3 points 11 months ago

Also, a way to never have to work again!

[–] ArbitraryValue@sh.itjust.works 2 points 11 months ago (1 children)
  1. git pull
  2. git reset --hard HEAD
  3. try not to cry
  4. cry a lot
[–] CalcProgrammer1@lemmy.ml 2 points 11 months ago (1 children)

git reflog, you can get your old commits back

[–] ArbitraryValue@sh.itjust.works 1 points 11 months ago (1 children)

But I want to pretend none of this ever happened.

[–] winterayars@sh.itjust.works 1 points 11 months ago
git can we just pretend the last 30 minutes never happened

I feel like that would get more use than people want to admit.

[–] stilgar@infosec.pub 2 points 11 months ago

Pro tip: If your code gets flogged by git, you can always get revenge with git reflog 😉

[–] roastpotatothief@lemmy.ml 1 points 11 months ago* (last edited 11 months ago) (1 children)

Git is a great invention but it has a few design flaws. There are too many ways to confuse it or break it, using commands that look correct, or just forgetting something. I ended up writing simple wrapper script codebase to fix it. Since then no problems.

[–] oce@jlai.lu 1 points 11 months ago

It was conceived for experts so the new user experience is shit and the UI is not intuitive. But it has become such a widespread standard that it is very hard to completely overhaul the UI.

[–] Andrew15_5@mander.xyz 1 points 11 months ago
[–] lily33@lemm.ee 1 points 11 months ago (1 children)

Learning git is very easy. For example, to do it on Debain, one simply needs to run, sudo apt install lazygit

[–] Kata1yst@kbin.social 1 points 11 months ago

LazyGit may actually be black magic from Satan to tempt programmers into sin. And to that I say: 'where is a goat I can sacrifice to my dark lord?'