When you screw up git

782 points · 64 comments · view on lemmy.world

64 Comments

Cevilia@lemmy.blahaj.zone · 103 pts · 308d (20 replies)
[ removed ]
j4k3@piefed.world · 71 pts · 308d (10 replies)

It is a duplicated repeating error because this clownshow of a website is managed by squirrels and ducks. 1-800-273-8255 would be a valid US number. Doubling 273-8255 is not, but probably vibe coded under management that should be purged by these results.

GreenShimada@lemmy.world · 30 pts · 308d (1 reply)

Hey! Don't insult ducks like that! This clownshow website would be about 20% better if ducks were involved.

j4k3@piefed.world · 6 pts · 308d

I don't know. I was cursing at ducks an hour ago while trying to remember how to spell diatomaceous earth and the ducks were total fuckwits.

Whostosay@sh.itjust.works · 6 pts · 308d (7 replies)

Why not 1800-SUICIDE?

j4k3@piefed.world · 15 pts · 308d (1 reply)

intentions unclear. Am I calling For or Against

Whostosay@sh.itjust.works · 11 pts · 308d

Your call.

Buh dun tissss

locuester@lemmy.zip · 6 pts · 308d (3 replies)

It’s 1-800-APE-TALK

Whostosay@sh.itjust.works · 7 pts · 308d (2 replies)

Lmao not willing to do the phone math rn, does that actually fit the numbers?

locuester@lemmy.zip · 3 pts · 308d (1 reply)

Yes.

Whostosay@sh.itjust.works · 3 pts · 308d

That could be platformed.

WAIT YOU HAVE SO MUCH TO LIVE FOR, have you tried ape talk?

Well, I can't say that I have.

eager_eagle@lemmy.world · 2 pts · 307d

It exists too, it seems to be a support line from British Columbia, CA

https://www.crisislines.bc.ca/services

Catoblepas@piefed.blahaj.zone · 46 pts · 308d (6 replies)

Well, that’s easy to remember! 0118, 999, 881, 999, 119, 725...3.

fedditter@feddit.org · 20 pts · 308d (4 replies)

Did you see that ludicrious display last night??

OpenStars@piefed.social · 14 pts · 308d (3 replies)

Yes I did. Just put it over there with the rest of the fire.

kambusha@sh.itjust.works · 7 pts · 308d (2 replies)

Your name is Morris Moss, is it not?

fedditter@feddit.org · 4 pts · 308d (1 reply)

Your name is Morris Moss, is it not?

fedditter@feddit.org · 3 pts · 308d

It is not.

serpineslair@lemmy.world · 6 pts · 308d

The irony is, I remember it perfectly.

guillem@aussie.zone · 12 pts · 308d (1 reply)
[ removed ]
hakunawazo@lemmy.world · 2 pts · 308d

A B C D E F G, I hang a noose on this tree. 𝅘𝅥𝅮𝆕

But for real: You should reset hard the head of the git branch, not yours.

jaschop@awful.systems · 34 pts · 308d (2 replies)

It's never too late to git merge --abort!

TheFriendlyDickhead@feddit.org · 26 pts · 308d (1 reply)

But abortion is murder?!?!?!?!?

gravitas_deficiency@sh.itjust.works · 10 pts · 308d

🎶 every branch is sacred 🎶

SkunkWorkz@lemmy.world · 30 pts · 308d

“Proper way to commit after merge conflict” sounds like a robot trying to save a relationship after a bad sex experience

cupcakezealot@piefed.blahaj.zone · 26 pts · 308d (9 replies)
git reset --hard <commit-hash>  
git push -f origin main  

i didn't see anything, officer

martinb@lemmy.sdf.org · 20 pts · 308d (8 replies)

You should be forcibly kept away from production systems...

henfredemars@infosec.pub · 12 pts · 308d (2 replies)

We had an intern do this once. We changed our server config to make sure it wouldn’t accept such operations.

gravitas_deficiency@sh.itjust.works · -3 pts · 308d (1 reply)

It’s just a branch guard + properly implementing git user and team permission structures - you’re not “configuring a server”

marcos@lemmy.world · 4 pts · 307d

I wonder what you think "configuring" means.

joyjoy@lemmy.zip · 3 pts · 307d (4 replies)

Never use --force. Always use --force-with-lease.

enbiousenvy@lemmy.blahaj.zone · 2 pts · 307d (3 replies)

I've mistyped that a couple of times to be --force-with-leash

joyjoy@lemmy.zip · 4 pts · 307d

git push origin master --force-with-leash

Don't do that to your master.

cupcakezealot@piefed.blahaj.zone · 2 pts · 307d (1 reply)

only do that in puppygit (with consent)

kubica@fedia.io · 17 pts · 308d (2 replies)

git out --never-come-back

errer@lemmy.world · 9 pts · 308d (1 reply)

git never --gonna-give-you-up

gravitas_deficiency@sh.itjust.works · 2 pts · 308d

git never --gonna-let-you-down

Kolanaki@pawb.social · 13 pts · 308d (1 reply)

calls suicide hotline to ask for tech support

CanadaPlus@lemmy.sdf.org · 2 pts · 308d

Don't hold your breath, they're pretty mid at their actual job.

Anafabula@discuss.tchncs.de · 10 pts · 308d

Jujutsu (which is compatible with git) has a nice conflict resolution flow that doesn't break you workflow.

Conflicts are encoded into the commits, so that there is never a weird in between state that you have to deal with immediately before being able to do anything else.
Then you can use Jujutsu's easier history manipulation to resolve the conflict in the conflicted commits.

https://steveklabnik.github.io/jujutsu-tutorial/branching-merging-and-conflicts/conflicts.html

And you could always jj undo if you did something you didn't want to.

magic_lobster_party@fedia.io · 10 pts · 307d (1 reply)

Keep your commits small. Merge often. That will reduce the likelihood of terrible merge conflicts.

If you’re not sharing your work with your team mates for a long time, then you’re setting yourself up for trouble.

SpaceCowboy@lemmy.ca · 4 pts · 307d

Also rebase is usually better than merge.

peoplebeproblems@midwest.social · 8 pts · 308d (1 reply)

Been there too OP. Not a good place.

It's usually easier to find another job, it will reset your mind, and fear won't be driving you.

Or you could just commit what you have, comment "YOLO" and auto resolve conflicts and push.

tomjuggler@lemmy.world · 2 pts · 307d

I prefer to just delete the whole .git and start a new repository with the new version. We are pivoting the project, new name and new repo

dream_weasel@sh.itjust.works · 7 pts · 307d (1 reply)

No merges allowed. Rebase only.

dream_weasel@sh.itjust.works · 2 pts · 307d

And if you can't figure out how to rebase, I definitely don't want you solving your own merge commit!

schnurrito@discuss.tchncs.de · 7 pts · 307d

I remember when similar screenshots circulated for how to tell if i am running jdk or jre, which is even more surprising.

echodot@feddit.uk · 5 pts · 307d

See I wasn't really going to kill myself today, but the thought of dialing that long ass number is just to much.

GreenKnight23@lemmy.world · 4 pts · 307d (1 reply)

in life you commit to many things. you commit to yourself, to your partner, to happiness, to legacy.

when we die, is that like a push to origin?

when we die, do our commits all go to the big repo in the sky?

is god the maintainer? when you pray is that like a bug report?

so many questions...

ranzispa@mander.xyz · 1 pts · 299d

Little branch, as our master says: We all have our feature to accomplish. Once our feature is complete, our faith will be up to the maintainer. If you were a well behaved branch, you will be allowed to merge with the master. If you weren't so, you'll be deleted and burn In the flames of reflog.

aliser@lemmy.world · 3 pts · 307d (1 reply)

git is like a minefield. stray away even a little bit from standard path and you are done for. I had git multiple times throw some obscure errors at me when trying some commands and then trying to undo/recover. how's "undo" is not a git command I don't understand.

nialv7@lemmy.world · 1 pts · 307d

undo is a jj command ;)

invertedspear@lemmy.zip · 3 pts · 306d (1 reply)

My best friend when I fuck a commit up: https://ohshitgit.com/

luciferofastora@feddit.org · 1 pts · 305d

I didn't know about the "revert single file" trick either. The rest is a handy reference too, thanks for sharing!

Antagnostic@lemmy.world · 3 pts · 308d

If you git help, you could hash things out, rebase your commitments, and push forward to a better life. Then again I could just be cherry picking things.

dubyakay@lemmy.ca · 3 pts · 307d

Google gives you results based on your prior search history.

BCsven@lemmy.ca · 2 pts · 308d

Commit branch...I see your thinking of hanging yourself, here is a link to tying a noose

mavu@discuss.tchncs.de · 2 pts · 308d (5 replies)

I don't get why people have such problems with this they even make memes about it.

Have you people never merged anything by hand or what? It's really not hard.

mere@lemmy.blahaj.zone · 4 pts · 308d (2 replies)

it's fine for simple merge conflicts but it quickly gets messy when the two branches are trying to do opposite things to the same code

tomjuggler@lemmy.world · 2 pts · 307d

Or 3 branches..

dream_weasel@sh.itjust.works · 1 pts · 307d

Sounds like agreement and resolution are required pre merge conflict resolve.

enbiousenvy@lemmy.blahaj.zone · 2 pts · 307d (1 reply)

it's maybe more annoying in gamedev. textures, models are binary files that can't be changed line-by-line.

SleeplessCityLights@programming.dev · 1 pts · 306d

In game dev, a binary file conflict means someone is going to have to do their work a second time.

JasonDJ@lemmy.zip · 1 pts · 307d

man \
git

1984@lemmy.today · -4 pts · 307d

So cool, I havent seen an ad like this in at least a decade. I use something called an ad blocker and also I switched to Kagi, so.... :)