What is Git Rebase?

Поділитися
Вставка
  • Опубліковано 1 жов 2024

КОМЕНТАРІ • 13

  • @lil_pharma
    @lil_pharma 4 місяці тому +8

    Should dive into more details about the negative consequences of merge commits. That’s what I use, as it is the standard on my team, but it rarely causes issues. I’m not opposed to rebase, I actually like it, but it seems that if you’re taking the “skill issue” approach, it goes both ways. If you can mess them both up, why should I actually consider switching?

    • @GabrielSouza-sz5ju
      @GabrielSouza-sz5ju 4 місяці тому

      Only difference between both that I notice is that with merge you'd lose the commit history since its all compressed down to a single commit

    • @dwilmer1980
      @dwilmer1980 4 місяці тому

      ​@@GabrielSouza-sz5ju No, you don't loose your commit history with merge. Only if you squash commits before merging. Anyway, rebase is the way to go if you want to maintain a nice readable git history.

    • @bootdotdev
      @bootdotdev  4 місяці тому +5

      Merge commits create a branching tree structure in the Git history, which is inherently much harder to understand and reason about than a linear history. While it is *possible* to break stuff with rebase, if you take the (not very long) to learn how to do it, the mistakes are totally avoidable. The reward for switching to rebase is that your projects history is much easier to work with and understand.

  • @cattelia
    @cattelia 20 днів тому

    WAIT!

  • @ruanpingshan
    @ruanpingshan 4 місяці тому

    Sure, it's a skill issue that I always get weird stuff happening when rebasing with conflicts (missing changes, duplicated commits). Merge conflicts are much easier to understand because both versions are the "latest" in their respective branches, so the resolved version becomes the new "latest" version of the file. But I get the impression that if a conflict occurs while rebasing, there are more future commits waiting to be applied to the "resolved" file.

  • @f0ssig
    @f0ssig 4 місяці тому +1

    bootleg dev

  • @user-if2kq8nh8m
    @user-if2kq8nh8m 4 місяці тому

    We do rebases but still use merge commits when merging merge requests as our CI workflow depends on merge commit info

  • @rafaelnegron_web
    @rafaelnegron_web 4 місяці тому +1

    Is this a sneak peek at the new Git course?

  • @fosnieplays
    @fosnieplays 4 місяці тому +1

    😥

  • @gggrkm70
    @gggrkm70 4 місяці тому +11

    I've watched. and continue to use merge.

    • @dwilmer1980
      @dwilmer1980 4 місяці тому +5

      As he said. Skill issue. ;)