this post was submitted on 04 Apr 2024
1111 points (98.1% liked)

Programmer Humor

25822 readers
1510 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

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

I've been using merge, and I hate that I don't even know what rebase really does

[–] andrew@lemmy.stuart.fun 52 points 1 year ago* (last edited 1 year ago) (32 children)

Merge takes two commits and smooshes them together at their current state, and may require one commit to reconcile changes. Rebase takes a whole branch and moves it, as if you started working on it from a more recent base commit, and will ask you to reconcile changes as it replays history.

[–] pineapple_pizza@lemmy.dexlit.xyz 13 points 1 year ago (3 children)

This diagram seems wrong to me. Isn't the second image a squash merge? Also why would rebasing a feature branch change main?

[–] andrew@lemmy.stuart.fun 3 points 1 year ago

Yeah, the image (not mine, but the best I found quickly) kinda shows a rebase+merge as the third image. As the other commenter mentioned, the new commit in the second image is the merge commit that would include any conflict resolutions.

load more comments (2 replies)
load more comments (30 replies)
load more comments (35 replies)