Git REBASE Explained: Unveiling Rebase's Hidden Hazard

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

КОМЕНТАРІ •

  • @themoderncoder
    @themoderncoder  Рік тому +1

    MORE GIT VIDEOS: ua-cam.com/play/PLfU9XN7w4tFwKwh_xPSQ_X1-hROQEpHnM.html

  • @ventin75
    @ventin75 Рік тому +8

    The best git animation on youtube. Helps me to visualise what is happening. Looking forward to the next one.

    • @themoderncoder
      @themoderncoder  Рік тому

      Appreciate it, and thanks for following my vids!

  • @sly-ryder-dietz
    @sly-ryder-dietz Рік тому +5

    Nice cliffhanger! I'm excited to learn what happens next!

  • @michaeleaster1815
    @michaeleaster1815 Рік тому +1

    2:14 Subscribed. Thank you for the videos and esp. the animations: they are fantastic.

  • @noor_nee
    @noor_nee Рік тому +1

    what are the odds ?!
    i just searched for a git rebase video and the video you uploaded about 5 years ago was the first result i saw.
    really loved the video btw; decided to checkout your other videos and then boom, a video about git rebase is the most recent!

    • @themoderncoder
      @themoderncoder  Рік тому +2

      Thanks for taking the time to check out my other stuff! I can definitively say my newer videos are leaps and bounds higher quality than my older stuff, and I’m really trying to bring awareness to that, so I appreciate you checking it out!

  • @PwnKilla
    @PwnKilla 5 місяців тому

    When you say "keep your feature branch intact for documentation purposes" what do you mean does your local feature branch somehow gets deleted when a fast-forward happens? timestamp 3:10

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

      The feature branch doesn't get deleted during a FF, but because rebase erases the fork feature branches fork from the main branch, you can't tell where the feature branch started.

  • @francescopisu1568
    @francescopisu1568 Рік тому

    At 2:52 we've already done git rebase main while on the feature_branch ?

    • @themoderncoder
      @themoderncoder  Рік тому

      Yeah, that would be one scenario. The other scenario could be that no other changes were pushed to main while the feature branch was in development

  • @jacopopecchini2267
    @jacopopecchini2267 5 місяців тому

    really good content

  • @learner8084
    @learner8084 Рік тому

    What is there are unstaged files in the feature branch ? Is the rebase update that file, but the files are not committed, then ?

    • @themoderncoder
      @themoderncoder  Рік тому

      If there are upstaged changes in the working directory then rebase will fail and you'll need to either stash or commit those changes to continue rebasing.

  • @pascualrosario8633
    @pascualrosario8633 Рік тому

    really nice video!

  • @adriananin3150
    @adriananin3150 Рік тому

    Awesome video! Thanks

  • @ShivamSharma7
    @ShivamSharma7 Рік тому

    Amazing Zack :)

  • @GizmoMaltese
    @GizmoMaltese Рік тому

    I don't get it. What if one of the files you're changing has been updated by someone else? How does rebase work there?

    • @themoderncoder
      @themoderncoder  Рік тому

      You’ll get a conflict (just like you would during a merge) and you’ll need to tell Git how to incorporate the other person’s changes

  • @sanjayplays5010
    @sanjayplays5010 Рік тому

    Definitely earned that sub, great video and succinct explanation ;)

  • @rayenchtioui8188
    @rayenchtioui8188 Рік тому

    thank you

  • @abdelazizez-zahed5009
    @abdelazizez-zahed5009 6 місяців тому

    gooog

  • @ChrisAthanas
    @ChrisAthanas Рік тому

    The second video in the series is marked PRIVATE
    Is that on purpose?

  • @cFyugThCzvAqYaGmxRgfCKTuvHMEjQ

    I don't think I saw a pitfall here - what did I miss?

    • @themoderncoder
      @themoderncoder  Рік тому +1

      Rebasing a branch that is shared by other contributors is the pitfall. If someone else has your feature_branch pulled into their local workspace then rebasing it will cause issues for them. Since rebase works by erasing then re-creating commits, you can cause yourself and your teammates synchronization problems by rebasing shared branches/commits.

    • @greyshopleskin2315
      @greyshopleskin2315 10 місяців тому

      @@themoderncoderhow would you resolve a situation like that, it is a bit confusing

    • @greyshopleskin2315
      @greyshopleskin2315 10 місяців тому

      @@themoderncoderi guess it would be to rebase your new commits into the remote branch