What is Git Rebase?

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

КОМЕНТАРІ • 17

  • @xmandeng
    @xmandeng Місяць тому

    I too shied away from `git rebase` until stung by a dozen developers continuously merging the latest changes from main into their feature branches. Just wait until someone reverts code ...uhg!! Realizing I had a "skill issue", I got over my trepidations and invested some time into learning how to use my tools. Now, our team embraces `rebase` and `squash` and life is good.

  • @lil_pharma
    @lil_pharma 6 місяців тому +9

    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 6 місяців тому

      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 6 місяців тому

      ​@@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  6 місяців тому +6

      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.

  • @GlebParfenov
    @GlebParfenov День тому

    Rebase is cool I often use rebase to update my feature branch

  • @bogdanbuduroiu5889
    @bogdanbuduroiu5889 Місяць тому +2

    Where part 2?

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

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

  • @CharleswoodSpudzyofficial
    @CharleswoodSpudzyofficial 24 дні тому

    Rebase is the gigachad way

  • @ruanpingshan
    @ruanpingshan 6 місяців тому

    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.

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

    Is this a sneak peek at the new Git course?

  • @gggrkm70
    @gggrkm70 6 місяців тому +14

    I've watched. and continue to use merge.

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

      As he said. Skill issue. ;)

  • @MyMystakes
    @MyMystakes 6 місяців тому +1

    😥

  • @cattelia
    @cattelia 2 місяці тому

    WAIT!

  • @f0ssig
    @f0ssig 6 місяців тому +2

    bootleg dev