Learn Git Rebase in 6 minutes // explained with live animations!

762,358
0
Published 2017-11-24
The better way to learn Git. Discover how visual animation and live coding examples can shortcut your Git journey: learngit.io/

Newsletter readers get my videos early: newsletter.themoderncoder.com/

----

LINKS
Written rebase reference: www.themoderncoder.com/a-better-git-workflow-with-…
Rebase caveats: www.atlassian.com/git/tutorials/merging-vs-rebasin…

MY TECH
www.themoderncoder.com/wfh-nyc-desk-tour-2022/

MUSIC
Intro/outro music by Dyalla: soundcloud.com/dyallas

DESCRIPTION
In this git rebase tutorial, I'll show you a different way of approaching git branching/merging with rebase. My team at Amazon adopted the workflow you'll see in the video and we love it. Whether you're mostly a solo developer or on a large team, give this a shot, I guarantee that even if you don't use rebase all the time, it will become an essential part of your development toolkit.

All Comments (21)
  • @1988mib
    Git must be explained with real examples and animations. This was the best tutorial I have seen on internet so far. Top quality content. Subscribed.
  • @JKhalaf
    Like the others mentioned, the animations really helped! thank you for taking the time to do them. ❤
  • 1. Rebasing master into the feature branch is dangerous if someone else working on that feature too. 2. Rebasing feature into master isn't a good solution, cause you can't revert all feature (if needed), you have to revert all commits one-by-one of that feature. 3. Git history can be nice and clean if you will merge features into the master with not allowing fast-forwarding and use "first-parent" when looking into log graph. In that case you will get just merge-commits which describes what that feature does and no other commits. 4. If you are working with tags, and, for example, track revisions of commits in your feature branch, rebasing will mix all tags into master. so, as for me, rebasing sub-branches into feature branch after code review is a good idea, but rebasing into master or from master into feature branch doesn't look like a good solution
  • 6 years later and this is still an amazing video! Super clear and intuitive, thank you!
  • @ErikBongers
    The way this is demonstrated with "live command typing" combined with "animated slides" is very intuitive! I imaging this takes quite some preparation/post-production. Thanks for that.
  • Wow, I thought git rebase was complex, but you managed to explain it in under 7 minutes EXTREMELY clearly. The graphics really helped. Great work man. Thanks so much
  • @TranceJams
    If you'd like to preserve the idea of merge requests and approvals I recommend doing rebasing only on feature branches and when it's good to go open a PR to merge with master. This will help prevent damage being done in master as well.
  • @drew4980
    really love the way you organized things at 4minutes with the branch updating as you go. Even better than you showed local master vs remote master. Nicely explained as well.
  • @farstep4011
    I am a student at a Japanese University. I study programming for myself. Thank you for making good movies all the time. I wish there was a super like button on YouTube 👍
  • The extra time you have spent creating the animations is well worth it - especially recognising that at some point your local work has to be pushed up to the origin repo - this is the best video on rebasing I have come across - I've subscribed to your channel - thank you for creating this tutorial.
  • @suraj2085
    this is the best video on rebase i found on youtube
  • @bigsaves
    That lil animation with commits moving across speaks a thousand words. Well done. Will share with my team.
  • Bro, thanks so much!!!! really enjoyed the graphics on the video that went along with what you were saying.
  • @rosscoguitar
    Thank you for explaining this so well. Almost 5 years later, this is still the best explanation of this on YouTube.
  • @dataworksstudio
    Probably watched half a dozen videos...but nobody taught this concept better than u...the animations were ❤️
  • @CoryTheSimmons
    Best git video on YouTube. I've been using this strategy since 2013 and it's still the best approach I've found. I'd suggest just ignoring everything after 5:25 and just open a PR to the repo at that point. Then try to get your code reviewed/merged first so someone else has to deal with merge conflicts—otherwise you will have to rebase your PR frequently depending on the size of the team working on the repo.
  • @Novica89
    Tutorials like THESE must be added to any command on GIT documentation! GIT in itself, without any specific real world examples is so complicated (at least for me) and I understood about 60% of the theory they were trying to teach me in GIT docs but still not sure if I'm supposed to rebase from master onto my branch or checkout to my branch and then rebase master in order to get the latest master branch code changes to my feature branch and was reluctant to even try to do it ! This is exactly the video I needed to see, thank you my friend
  • @BernardPaques
    A lovely visual way to explain quite complicated concepts, and delivered in less than 7 minutes. Great job, thanks!
  • @sanlep9298
    Thanks a lot! It seems like no one can explain how git works, so they make videos without graphs just talking in a confusing manner making it harder to understand. Thank you again!