Git rebase is not that scary

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 พ.ย. 2024
  • Git Rebase may seem daunting, but it's a powerful tool that, when understood, can significantly streamline your workflow. In this video, AES demystifies the Git Rebase process, explaining when and how to use it effectively. Many developers are cautious about using Git Rebase due to its ability to rewrite history, which can lead to unintended consequences if not used carefully. However, AES highlights that with proper understanding, this command can be a cleaner alternative to merging, eliminating unnecessary commits and maintaining a linear project history. The video walks through practical scenarios, demonstrating how to safely perform a rebase on feature branches, avoiding common pitfalls like rebasing on the master branch. By the end, you'll see that Git Rebase isn't as scary as it seems-it's a valuable tool in your version control toolkit, provided you know what you're doing. Whether you're managing a simple project or collaborating in a large team, mastering Git Rebase can help keep your project history tidy and easy to understand.
    Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.
    All the learning resources such as code files, documentations, articles and community discussions are available on our website:
    chaicode.com/
    You can find our discord link, github link etc on the above website.
    Twitter/X link: x.com/hiteshdo...
    Discord link: hitesh.ai/discord
    Learn React with 10 projects: • Let's learn react from...
    Learn Docker: • A practical guide on D...
    Learn Kubernetes: • Complete Kubernetes Co...
    How does a browser works: • How does a browser wor...
    How nodejs works: • How node JS works | En...
    Learn Redux-toolkit: • Learn Redux Toolkit in...
    Learn NextJS: • Nextjs Full stack course
    Learn Typescript: • Why to learn Typescript
    Learn Javascript: • Welcome to new JavaScr...
    Learn React Native: • React Native Mastery: ...
    Learn Zustand: • React state management...
    Learn Golang: • How to get started wit...

ความคิดเห็น • 42

  • @sahiljaiswal9270
    @sahiljaiswal9270 5 หลายเดือนก่อน +2

    suppose M1, M2,... mean commits in master branch and B1, B2, ... means commits in a particular branch. if you go to that branch and run git rebase master it does this:(M3 added as new commit before B1, B2 in branch's log)
    B1->B2 B1->B2
    ^ ^
    M1->M2->M3 M1->M2->M3
    and if you do the opposite, the main branch is shifted along the branch which is a problem. (B1,B2 added as new commits before M3 in master's log)

    B1->B2->M3...(master continues here)
    ^
    M1->M2

    • @bhupenpal
      @bhupenpal 27 วันที่ผ่านมา

      Nope! That's not how it works. Rebase is not going to create any additional commits.
      If you switch to branch B and run git rebase master, you will get:
      M1 -> M2 -> B1 -> B2
      This will happen on branch B.

  • @KakatkarAkshay
    @KakatkarAkshay 7 หลายเดือนก่อน +4

    In case you mess up the rebase but you haven't removed .git folder, you can use git reflog to get commit history before rebase. Rebase is really not hard. I find it's the same as cherry-pick. Btw you should also show git rebase -i and squash, edit and things.

    • @tarun-d1t
      @tarun-d1t 6 หลายเดือนก่อน

      hey bro need some help with git stashing, is there any way that i can contact u

    • @VictorYarema
      @VictorYarema 5 หลายเดือนก่อน

      @@tarun-d1t my simplest advice after insane amount of my best years with git: never ever touch stashes even with the longest stick in the world. They are like branches, but are simply incredibly limited. Absolutely no business value compared to branches. Just master branches and that would be enough for everything you may ever need.

  • @ankushladani496
    @ankushladani496 7 หลายเดือนก่อน

    Add more comments guys don't only see content and go away.
    Atleast this man deserves a like and share.😊

  • @ehsanhasin
    @ehsanhasin 3 หลายเดือนก่อน +1

    thank you Hitesh, awesome description

  • @ratulsamanta9380
    @ratulsamanta9380 7 หลายเดือนก่อน +2

    Thank u for sharing such content. Really good content

  • @amaurya5556
    @amaurya5556 7 หลายเดือนก่อน +1

    best git course out there

  • @ajaysubramaniam4453
    @ajaysubramaniam4453 7 หลายเดือนก่อน +1

    What is the difference between rebasing from master and feature branch?

  • @sumedhux
    @sumedhux 7 หลายเดือนก่อน +1

    Thumbnail is so nice

  • @charlesuneze
    @charlesuneze 4 หลายเดือนก่อน +1

    Don’t forget to force push with a “git push -f” when doing a git rebase.

  • @jk-sm6qr
    @jk-sm6qr 7 หลายเดือนก่อน

    Cool, Very information and important.
    Thank you so much ❤

  • @harshitpant07
    @harshitpant07 7 หลายเดือนก่อน +2

    what i learnt here is I don't care about the history so I don't care if their is a command called `git rebase feature ` .... :)

  • @uttamsharma3242
    @uttamsharma3242 7 หลายเดือนก่อน

    This was really very informative!!

  • @ShreyAsthana05
    @ShreyAsthana05 5 หลายเดือนก่อน

    what terminal are you using?

  • @VivekKumarito
    @VivekKumarito 7 หลายเดือนก่อน +1

    Ho gaya bhai

  • @sivasai6890
    @sivasai6890 7 หลายเดือนก่อน

    Thank you so much sir❤

  • @ofcljaved
    @ofcljaved 7 หลายเดือนก่อน +1

    The main keypoint: NEVER DO REBASE ON MASTER/MAIN BRANCH... NEVER

  • @cyb3rjunky609
    @cyb3rjunky609 7 หลายเดือนก่อน

    you really are a great teacher

  • @streamstudiosllc
    @streamstudiosllc 3 หลายเดือนก่อน

    Thanks!!

  • @RohitChhabirajYadav
    @RohitChhabirajYadav 7 หลายเดือนก่อน

    Thank you sir ji

  • @afamsval
    @afamsval 7 หลายเดือนก่อน

    Thank you Sir

  • @RohitChhabirajYadav
    @RohitChhabirajYadav 7 หลายเดือนก่อน +1

    #git #github

  • @not_amanullah
    @not_amanullah 7 หลายเดือนก่อน

    thanks ❤

  • @2amCoder
    @2amCoder 7 หลายเดือนก่อน

    what about abort? it will end everything?

  • @shreyvasani8751
    @shreyvasani8751 7 หลายเดือนก่อน

    Can you provide notes ?

  • @i_vishalsah01
    @i_vishalsah01 4 หลายเดือนก่อน

    got the concept of rebase clear...

  • @munna5553
    @munna5553 7 หลายเดือนก่อน

    everyone please share this

  • @imamansoni
    @imamansoni 7 หลายเดือนก่อน

    I'll watch this video again 1 or 2 times to get clear idea.

    • @imamansoni
      @imamansoni 7 หลายเดือนก่อน

      Now i understand it a bit better 😅

  • @ankushladani496
    @ankushladani496 7 หลายเดือนก่อน

    💯💯🎉🎉

  • @MunishMummadi
    @MunishMummadi 7 หลายเดือนก่อน

    Just scratched my head with the rebase over a os contribution and this video is like how I approached it but it took hours for me😂

  • @zeroinfinity3610
    @zeroinfinity3610 5 หลายเดือนก่อน

    you can see the differene b/w didi bhiya course and hitseh sir's lectures

  • @Entire.Studio
    @Entire.Studio 7 หลายเดือนก่อน

  • @ankitkashyap2005
    @ankitkashyap2005 6 หลายเดือนก่อน

    ❤❤

  • @Xyz.hshdos
    @Xyz.hshdos 7 หลายเดือนก่อน

    Continue AWS after this

  • @ws9691
    @ws9691 3 หลายเดือนก่อน +1

    Jesus is my Master 🙏💙🕎✝

    • @Moelkenzi
      @Moelkenzi 3 หลายเดือนก่อน +1

      Jesus is prophet ❤

  • @adityadarade6311
    @adityadarade6311 7 หลายเดือนก่อน

    comment

  • @coolwithsaquibaquib
    @coolwithsaquibaquib 7 หลายเดือนก่อน

    Day 7 present

  • @ArbabMemon-r7m
    @ArbabMemon-r7m 7 หลายเดือนก่อน