this post was submitted on 11 Feb 2024
56 points (93.8% liked)

Programming

17540 readers
69 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] BrianTheeBiscuiteer@lemmy.world 3 points 9 months ago (7 children)

Does this help with rebasing? I rarely have a need to rebase but all the same I avoid it because I just don't get it.

[–] Oszilloraptor@feddit.de 4 points 9 months ago (2 children)

How you could somewhat rebase manually (to understand the effect; or because you like to handle the merge conflicts more granular or be more selective):

We assume we have the branch "Feat" which was started on an old version of "Main", and now want to rebase it:

  • Rename "Feat" to "Old" (does not happen during rebase, but we kinda need it for this demonstration)
  • Create "Feat" at the newest (or wherever you want) commit of "Main"
  • Cherrypick all commits from "Old" into "Feat"

Et viola - you kinda manually rebased "Feat" on "Main"

[–] BrianTheeBiscuiteer@lemmy.world 2 points 9 months ago (1 children)

Unless you really hate the commits that say "merged branch X into Y" I never saw rebasing as any easier than merging.

[–] Traister101 1 points 9 months ago

Rebasing shines for local commits not remote commits. IE rebase your commits onto the remote or amend the previous commit (yes that's actually a rebase)

load more comments (4 replies)