Git Merge Vs Rebase with Example | Differences Between Git Merge and Rebase and which one to choose?

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ส.ค. 2022
  • Hi,
    Today i have explained the 2 main commands of Git.
    1. Git Merge
    2. Git Rebase
    Both are used to integrated the changes of one branch in another. But the way they work is different.
    - Git Merge, preserve the commit history, while Git Rebase re-writes the commit history.
    - Git Merge add new commit but Git rebase do not add any new commit.
    Whenever we work in Public branch, try to avoid Git Rebase.

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

  • @amofficialtv4642
    @amofficialtv4642 ปีที่แล้ว +2

    I have seen many youtube video. But i can't understand what does rebase doing. Finally your video clear me. Very helpful video.Thank you❤️

  • @suryakumar7092
    @suryakumar7092 29 วันที่ผ่านมา +1

    Not knowing this concept, I was once rebasing my feature_branch with master locally. Got few merge_conflicts, resolved it, and rebased again, again got same conflicts, again resolved them and rebased again....this cycle continued till my senior observed it and suggested me go and watch why I shouldn't do rabase but merge.
    Now its clear (Thanks to ur video), rebasing was removing my merge_resolved commit and re-applying those onto master, which means nothing to master and hence the iterative merge_conflicts.

  • @pratikkshirsagar6481
    @pratikkshirsagar6481 10 หลายเดือนก่อน +5

    Best explanation on internet, very underrated video

    • @ConceptandCoding
      @ConceptandCoding  10 หลายเดือนก่อน

      Thanks

    • @DemystifyFrontend
      @DemystifyFrontend 9 หลายเดือนก่อน

      Bhai good content on TH-cam is always underrated. Its rated when good seekers like us😂 meet awesome content like this

  • @Mauliksavalia
    @Mauliksavalia 4 หลายเดือนก่อน +2

    You have explained in very well manner. This is very informative video. I just get this concept in a single time.

  • @emad1166
    @emad1166 3 หลายเดือนก่อน +2

    Simple explanation, very well explained. Sometimes simplicity is what needed for complex things

  • @farhaankazi7134
    @farhaankazi7134 10 หลายเดือนก่อน +2

    video is very good. it cleared my things along with merge and rebase. For example If I am not wrong then rebase does not create new commit just write last commit of the one branch to other branch. First rebase takes the last commit of first branch and then write all changes to second last commit of another branch. Such action obliterate the history or tracking of commits as well as forking of branches (linking of branches done by merging). Although, rebase makes it simple linear but it rewrite new history. This can also be dangerous if many developers are working together and committing lot of changes and creating many forks. Rebase will erase the forks and links and we can not trace back in time properly to undo new changes

  • @mohitsinha7236
    @mohitsinha7236 9 หลายเดือนก่อน +2

    This video is very helpful. I read many documentation and watched many videos on this topic. None helped me like this video. Great work!

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

    Just one wish, never ever stop making such great content

  • @PraveenKumar-wx5yt
    @PraveenKumar-wx5yt 8 หลายเดือนก่อน +1

    Watched many but this got me. Thanks.

  • @gauravgupta5530
    @gauravgupta5530 ปีที่แล้ว +1

    I want to say that, I have bookmarked this video in my GitHub learnings. Thanks for such a wonderful explanation and with a short description of notes too. Keep up the good work 🙂.
    Also want to learn from you the distinction between rollback with rebase and hard reset.

  • @theunusual4566
    @theunusual4566 ปีที่แล้ว +1

    Ek number Bhiya, Got it in one go. Thanks for the video.

  • @ramsai6141
    @ramsai6141 ปีที่แล้ว +1

    Crystal clear explaination brother.
    Keep doing such an informative useful videos.

  • @DharmeshTechZone
    @DharmeshTechZone ปีที่แล้ว +1

    Nice video very easy and clean understanding for closest different between them, thank you so much

  • @KunalSinghStatus
    @KunalSinghStatus ปีที่แล้ว +2

    mind blowing sir, I tried by myself for the testing ... Understood 🙏🏻🙏🏻

  • @sundergopalsingh
    @sundergopalsingh ปีที่แล้ว +1

    Very informative content about the basics of git and rebase , merge usage

  • @vishakhathombare6387
    @vishakhathombare6387 6 หลายเดือนก่อน +1

    Very clearly and nicely explained.. thank you so much

  • @light-sg5sl
    @light-sg5sl 9 หลายเดือนก่อน +2

    Thank you sirji
    Very helpful

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

    Very good explanation👍

  • @neutralengineer3873
    @neutralengineer3873 6 หลายเดือนก่อน +1

    Awesome explanation bro. Aaj samjh aaya.

  • @sadashivshinde9150
    @sadashivshinde9150 ปีที่แล้ว +1

    Thanks for the video it was helpful

  • @KishanSingh-ol7pd
    @KishanSingh-ol7pd 10 หลายเดือนก่อน

    Keep up the good work:) more power to you

  • @pushkerpandey9312
    @pushkerpandey9312 11 หลายเดือนก่อน +1

    this is best explanation so far

  • @raipurianfooddiary4275
    @raipurianfooddiary4275 5 หลายเดือนก่อน +1

    Great Explanation 👍

  • @unemployedcse3514
    @unemployedcse3514 5 หลายเดือนก่อน +1

    Awesome ❤

  • @aakashbobade7578
    @aakashbobade7578 10 หลายเดือนก่อน +1

    Very simple nice thanks

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

    while doing (git merge master) f1 -> m1 -> m2 -> f2 -> f3 this is the sequence right, now if m1 and m2 are alredy merged then what is in f3 commit

  • @ramprasadthakur1682
    @ramprasadthakur1682 6 วันที่ผ่านมา +1

    Thanks

  • @ch.pruthvi9632
    @ch.pruthvi9632 ปีที่แล้ว

    Hey Brother it's a great video! Can u also make a video on merge conflicts cases and handling in both merge and rebase cases

  • @sakibmalik6956
    @sakibmalik6956 ปีที่แล้ว +1

    Thanku sir this is very helpful

  • @pramilasatheesh54
    @pramilasatheesh54 ปีที่แล้ว

    Wonderful explanation... Do u have other videos for git.. Grt

  • @rabindraacharya5899
    @rabindraacharya5899 28 วันที่ผ่านมา

    Hello,
    Encountered an issue when pulling code from the origin repository:
    fatal: Not possible to fast-forward, aborting.
    I resolved it by rebasing, but this problem recurs whenever someone pushes code. Oddly, it only occurs on my system. Any suggestions for a permanent fix? Currently, I resort to rebasing every time to address it. Is there a more lasting solution available?

  • @tusharguptayash
    @tusharguptayash ปีที่แล้ว +1

    Bro thumbnail is summary and it is good

  • @Artofcoding786
    @Artofcoding786 ปีที่แล้ว +1

    Awesome

  • @DevanshiGupta-nn3zh
    @DevanshiGupta-nn3zh 11 หลายเดือนก่อน

    Good explanation ....when will you launch your Spring Boot series...eagerly waiting !!

    • @ConceptandCoding
      @ConceptandCoding  11 หลายเดือนก่อน

      Soon, only few Java topics left after that I will start springboot

    • @DevanshiGupta-nn3zh
      @DevanshiGupta-nn3zh 11 หลายเดือนก่อน

      Great 👏

  • @farhaankazi7134
    @farhaankazi7134 10 หลายเดือนก่อน

    Hi Can you provide link to download the list of commands you shown in vlog with explanation

    • @ConceptandCoding
      @ConceptandCoding  10 หลายเดือนก่อน

      I will create and share buddy

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

    ❤ pls also explain merge conflict and resolution

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

    Git ka sara command kha per hai

  • @vishalsaxena5081
    @vishalsaxena5081 11 หลายเดือนก่อน

    u should use practical also

  • @vivekkumarshaw6495
    @vivekkumarshaw6495 ปีที่แล้ว +1

    Sir can u please share ur telegram grp link