this post was submitted on 09 Nov 2023
1081 points (98.1% liked)

Programmer Humor

32480 readers
284 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] cupcakezealot@lemmy.blahaj.zone 33 points 1 year ago (2 children)

lemme rebase the main branch onto my branch.

two minutes later

1 merge conflict of 57 [abort] [continue]

[–] affiliate@lemmy.world 13 points 1 year ago (1 children)

this is easily fixed by copy pasting the files into a new directory and never opening git again out of fear

[–] caseyweederman@lemmy.ca 11 points 1 year ago

Project managers hate this one weird trick!

[–] kamen@lemmy.world 7 points 1 year ago

One key thing that can help you wrap your head around rebasing is that branches get switched while you're doing it; so, say you're on branch feature and do git rebase master, for any merge conflict, whatever's marked "current" will be on master and what's "incoming" is from feature.

There's also git rerere that should in theory remember a resolution you do between two branches and reuse it every time after the first; I've rarely used it in practice; it would happen for long lived branches that don't get merged.