title
Git MERGE vs REBASE

description
Understand the differences between MERGE and REBASE and learn how to efficiently use these commands in your projects! 🖥️ Official Website & Courses https://academind.com/courses/ 👨‍💻 Learn Git & GitHub Today https://acad.link/git 📝 Other Resources Git REBASE - official docs: https://git-scm.com/book/de/v2/Git-Branching-Rebasing Git MERGE - official docs: https://git-scm.com/docs/git-merge 👋 Social Media https://twitter.com/maxedapps https://twitter.com/academind_real https://www.instagram.com/academind_real/ https://www.facebook.com/academindchannel/ 💬 Academind Community on Discord https://discord.gg/gxvEWGU ---------- Academind is your source for online education in the areas of web development, frontend web development, backend web development, programming, coding and data science! No matter if you are looking for a tutorial, a course, a crash course, an introduction, an online tutorial or any related video, we try our best to offer you the content you are looking for. Our topics include Angular, React, Vue, Html, CSS, JavaScript, TypeScript, Redux, Nuxt.js, RxJs, Bootstrap, Laravel, Node.js, Progressive Web Apps (PWA), Ionic, React Native, Regular Expressions (RegEx), Stencil, Power BI, Amazon Web Services (AWS), Firebase or other topics, make sure to have a look at this channel or at academind.com to find the learning resource of your choice!

detail
{'title': 'Git MERGE vs REBASE', 'heatmap': [{'end': 301.662, 'start': 281.706, 'weight': 0.831}, {'end': 490.186, 'start': 463.289, 'weight': 0.72}, {'end': 597.333, 'start': 549.937, 'weight': 0.703}], 'summary': 'Compares git merging and rebasing, focusing on branching, committing, merging, squashing, and rebasing in git, and cautioning against using rebase in public repositories.', 'chapters': [{'end': 248.406, 'segs': [{'end': 62.165, 'src': 'embed', 'start': 2.287, 'weight': 0, 'content': [{'end': 3.127, 'text': 'Welcome to this video.', 'start': 2.287, 'duration': 0.84}, {'end': 8.61, 'text': 'This video starts a bit different because, as the title says,', 'start': 4.088, 'duration': 4.522}, {'end': 14.932, 'text': 'we want to have a look at git rebase and git merge and see how these two commands work and how we can use them.', 'start': 8.61, 'duration': 6.322}, {'end': 22.956, 'text': 'The problem is that these commands, well, can be applied in a lot of different situations and pros and cons and so on.', 'start': 15.753, 'duration': 7.203}, {'end': 28.138, 'text': 'And actually, I just wanted to give you a quick example how you could use both of these.', 'start': 23.336, 'duration': 4.802}, {'end': 34.023, 'text': "For that we'll have a look at our quick example project now in the intro and then continue with the actual code.", 'start': 28.658, 'duration': 5.365}, {'end': 37.587, 'text': "Because in this video we'll start with the following situation.", 'start': 34.584, 'duration': 3.003}, {'end': 41.31, 'text': "We'll have a master branch right here with two commits.", 'start': 38.187, 'duration': 3.123}, {'end': 45.014, 'text': 'm1, m2, master commit 1, master commit 2.', 'start': 41.731, 'duration': 3.283}, {'end': 46.916, 'text': "Doesn't matter a lot in the end how we name them.", 'start': 45.014, 'duration': 1.902}, {'end': 52.121, 'text': 'The important thing is that this example project will also come with a feature branch.', 'start': 47.536, 'duration': 4.585}, {'end': 56.022, 'text': 'This feature branch is created based on the master branch.', 'start': 52.461, 'duration': 3.561}, {'end': 62.165, 'text': 'So based on this last commit in the master branch, basically, and we implemented some stuff in there.', 'start': 56.162, 'duration': 6.003}], 'summary': 'Video explaining git rebase and merge using example project with master and feature branches.', 'duration': 59.878, 'max_score': 2.287, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CRlGDDprdOQ/pics/CRlGDDprdOQ2287.jpg'}, {'end': 165.908, 'src': 'embed', 'start': 132.791, 'weight': 3, 'content': [{'end': 136.372, 'text': 'you can see that we have exactly the same structure that we saw on the slide.', 'start': 132.791, 'duration': 3.581}, {'end': 139.593, 'text': 'We have two branches, master and feature.', 'start': 136.852, 'duration': 2.741}, {'end': 145.155, 'text': 'And if I have a look at the commits in my master branch, you can see that I have three commits.', 'start': 140.133, 'duration': 5.022}, {'end': 148.616, 'text': 'The third one, the second one, and the first commit, m1.', 'start': 145.655, 'duration': 2.961}, {'end': 153.795, 'text': "Let's now check out the other branch, the feature branch right here.", 'start': 149.757, 'duration': 4.038}, {'end': 158.822, 'text': "like this and also see what's in there.", 'start': 155.299, 'duration': 3.523}, {'end': 165.908, 'text': 'and as you can see, we have f1, so the first commit in the feature branch and, important, this m2 commit right here,', 'start': 158.822, 'duration': 7.086}], 'summary': 'The master branch has 3 commits, while the feature branch has 2 commits including m2.', 'duration': 33.117, 'max_score': 132.791, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CRlGDDprdOQ/pics/CRlGDDprdOQ132791.jpg'}], 'start': 2.287, 'title': 'Git branching and committing', 'summary': 'Explains branching in git, focusing on master and feature branches, and demonstrates adding and committing new features to the feature branch and merging them into the master branch.', 'chapters': [{'end': 132.791, 'start': 2.287, 'title': 'Git rebase vs. git merge', 'summary': 'Compares git rebase and git merge commands, illustrating how they can be used in different situations and their pros and cons, using an example project with master and feature branches each evolving with commits, and then demonstrates two ways to combine the latest commits from the feature branch and master branch, using git merge and git rebase.', 'duration': 130.504, 'highlights': ['The video compares git rebase and git merge commands and how they can be used in different situations with pros and cons. The chapter focuses on comparing the git rebase and git merge commands, highlighting their different applications and the advantages and disadvantages of each.', 'Illustrates the example project with master and feature branches evolving with commits. The example project is presented with a master branch and a feature branch evolving with commits, demonstrating the scenario for applying git rebase and git merge commands.', 'Demonstrates two ways to combine the latest commits from the feature branch and master branch using git merge and git rebase. The video demonstrates two approaches to combining the latest commits from the feature branch and master branch, showcasing the use of git merge and git rebase commands for integrating developments.']}, {'end': 248.406, 'start': 132.791, 'title': 'Git branching and committing', 'summary': 'Explains the concept of branching in git, with a focus on the master and feature branches, demonstrating the process of adding and committing new features to the feature branch and merging them into the master branch.', 'duration': 115.615, 'highlights': ['The chapter explains the concept of branching in Git The transcript provides a detailed explanation of the branching concept in Git, emphasizing the structure of master and feature branches.', 'Demonstrates the process of adding and committing new features to the feature branch and merging them into the master branch It illustrates the process of adding a new feature (f2) to the feature branch and committing it, followed by the intention to merge the feature branch into the master branch.']}], 'duration': 246.119, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CRlGDDprdOQ/pics/CRlGDDprdOQ2287.jpg', 'highlights': ['The video compares git rebase and git merge commands and their applications.', 'Illustrates an example project with master and feature branches evolving with commits.', 'Demonstrates two ways to combine the latest commits from feature and master branches.', 'Explains the concept of branching in Git, emphasizing master and feature branches.', 'Demonstrates the process of adding and committing new features to the feature branch and merging them into the master branch.']}, {'end': 549.617, 'segs': [{'end': 323.969, 'src': 'heatmap', 'start': 281.706, 'weight': 4, 'content': [{'end': 291.954, 'text': "basically and this branch is the feature branch like that, and now don't hit enter, please, because if you hit enter, this wouldn't be a problem.", 'start': 281.706, 'duration': 10.248}, {'end': 300.041, 'text': 'you would create a merge branch and you would have one last commit which combines all the changes of both branches,', 'start': 291.954, 'duration': 8.087}, {'end': 301.662, 'text': 'of the latest commits of both branches.', 'start': 300.041, 'duration': 1.621}, {'end': 307.744, 'text': 'but you would also merge all the other commits of your feature branch into your master branch.', 'start': 302.623, 'duration': 5.121}, {'end': 310.785, 'text': 'This is not necessarily a problem.', 'start': 308.525, 'duration': 2.26}, {'end': 317.467, 'text': 'This is actually quite nice because Git is a tool which allows us to track how our project evolved.', 'start': 311.065, 'duration': 6.402}, {'end': 323.969, 'text': 'So what different commits we had, which features we implemented, which features we kind of corrected afterwards and so on.', 'start': 317.567, 'duration': 6.402}], 'summary': 'Using git, merging feature branch allows tracking project evolution and combining changes.', 'duration': 23.928, 'max_score': 281.706, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CRlGDDprdOQ/pics/CRlGDDprdOQ281706.jpg'}, {'end': 400.642, 'src': 'embed', 'start': 345.345, 'weight': 0, 'content': [{'end': 348.488, 'text': 'And because of that, I will not use git merge right here.', 'start': 345.345, 'duration': 3.143}, {'end': 357.432, 'text': 'but git merge, dash, dash, squash feature, so the name of the other branch,', 'start': 349.562, 'duration': 7.87}, {'end': 363.26, 'text': 'because squash simply allows us to kind of summarize all the different commits.', 'start': 357.432, 'duration': 5.828}, {'end': 366.904, 'text': 'so all the changes we had in the feature branch in the last commit,', 'start': 363.26, 'duration': 3.644}, {'end': 374.047, 'text': 'so it kind of puts them together and then merges this last commit with the latest commit in the master branch.', 'start': 367.665, 'duration': 6.382}, {'end': 380.149, 'text': 'That sounds kind of complicated, but if I now simply hit enter, then you can see well.', 'start': 374.687, 'duration': 5.462}, {'end': 386.192, 'text': 'the automatic merge went well, sounds good, but it stopped before committing as requested.', 'start': 380.149, 'duration': 6.043}, {'end': 395.396, 'text': 'Now this sounds like a big problem, but the actual solution is that you simply enter git commit, minus m, and now the name of this new,', 'start': 386.932, 'duration': 8.464}, {'end': 400.642, 'text': 'of this merge commit, which could be feature and master merged.', 'start': 395.396, 'duration': 5.246}], 'summary': "Using 'git merge --squash' to summarize feature branch commits and merge with master.", 'duration': 55.297, 'max_score': 345.345, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CRlGDDprdOQ/pics/CRlGDDprdOQ345345.jpg'}, {'end': 496.851, 'src': 'heatmap', 'start': 463.289, 'weight': 1, 'content': [{'end': 472.974, 'text': 'But if I would see these two changes right here, so if F1 and F2, we also have a single commits in our feature branch would be displayed right here,', 'start': 463.289, 'duration': 9.685}, {'end': 476.516, 'text': 'which would allow me to kind of better track the changes I made and so on.', 'start': 472.974, 'duration': 3.542}, {'end': 478.617, 'text': 'And there is a way to do this.', 'start': 477.296, 'duration': 1.321}, {'end': 481.599, 'text': 'And for that, we can use git rebase now.', 'start': 479.057, 'duration': 2.542}, {'end': 485.722, 'text': "So it's time to kind of rewind the project a bit.", 'start': 482.14, 'duration': 3.582}, {'end': 490.186, 'text': 'So here we are back in our project, kind of rewind it, as I said.', 'start': 486.183, 'duration': 4.003}, {'end': 495.09, 'text': 'And if we look at git branch once again, you can see we have the two branches.', 'start': 490.746, 'duration': 4.344}, {'end': 496.851, 'text': 'We are currently in the master branch.', 'start': 495.27, 'duration': 1.581}], 'summary': 'Using git rebase to track feature branch changes and switch branches.', 'duration': 23.877, 'max_score': 463.289, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CRlGDDprdOQ/pics/CRlGDDprdOQ463289.jpg'}], 'start': 249.026, 'title': 'Git branch merging, squashing, and rebase', 'summary': "Covers merging and squashing branches in git, focusing on using 'git merge --squash' to consolidate the feature branch and merge with the master branch. it also discusses creating and naming merge commits with 'git commit -m' and explains git rebase for restructuring commit history, highlighting rewinding the project and comparing it with git merge.", 'chapters': [{'end': 374.047, 'start': 249.026, 'title': 'Git branch merging and squashing', 'summary': "Explains the process of merging and squashing branches in git, with a focus on combining commits and summarizing changes, emphasizing the use of 'git merge --squash' to consolidate the feature branch into a single commit and merge it with the master branch.", 'duration': 125.021, 'highlights': ["The chapter emphasizes the use of 'git merge --squash' to consolidate the feature branch into a single commit and merge it with the master branch, providing a structured way of summarizing all the different commits and changes (Squashing).", "The chapter discusses the implications of using 'git merge' versus 'git merge --squash', highlighting the difference in outcomes where the former merges all commits of the feature branch into the master branch, while the latter consolidates the changes into a single commit (Consolidation).", 'The chapter mentions the importance of tracking project evolution through Git, including the ability to monitor different commits, implemented features, and subsequent corrections, emphasizing Git as a tool for project evolution tracking (Project evolution tracking).']}, {'end': 421.919, 'start': 374.687, 'title': 'Git merge commit naming', 'summary': "Discusses the process of creating and naming a merge commit in git, highlighting the importance of using the 'git commit -m' command and demonstrating the resulting merge in the git log.", 'duration': 47.232, 'highlights': ["The chapter emphasizes the importance of correctly naming a merge commit in Git, demonstrating the command 'git commit -m' for this purpose.", "The process of creating a merge commit in Git is showcased, with an example of merging 'feature' and 'master' branches, demonstrating the resulting merge in the git log.", "The chapter describes encountering a potential issue during the automatic merge process, which is resolved by using the command 'git commit -m' for the merge commit naming."]}, {'end': 549.617, 'start': 422.68, 'title': 'Understanding git rebase', 'summary': 'Explains the process of using git rebase to restructure commit history, demonstrating how to rewind the project, rebase the feature branch, and compare rebase with git merge.', 'duration': 126.937, 'highlights': ['Git rebase is used to restructure commit history, allowing for a cleaner and more organized display of changes, which can be helpful for tracking the changes made.', 'The process involves rewinding the project to a previous state and then applying the rebase command, which works differently than git merge.', 'The demonstration shows how to use git rebase to achieve a more structured commit history, compared to using git merge.', 'The chapter also highlights the difference between using git rebase and git merge for managing commit history.']}], 'duration': 300.591, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CRlGDDprdOQ/pics/CRlGDDprdOQ249026.jpg', 'highlights': ["The chapter emphasizes the use of 'git merge --squash' to consolidate the feature branch into a single commit and merge it with the master branch, providing a structured way of summarizing all the different commits and changes (Squashing).", 'Git rebase is used to restructure commit history, allowing for a cleaner and more organized display of changes, which can be helpful for tracking the changes made.', "The chapter discusses the implications of using 'git merge' versus 'git merge --squash', highlighting the difference in outcomes where the former merges all commits of the feature branch into the master branch, while the latter consolidates the changes into a single commit (Consolidation).", "The chapter emphasizes the importance of correctly naming a merge commit in Git, demonstrating the command 'git commit -m' for this purpose.", 'The chapter mentions the importance of tracking project evolution through Git, including the ability to monitor different commits, implemented features, and subsequent corrections, emphasizing Git as a tool for project evolution tracking (Project evolution tracking).']}, {'end': 968.748, 'segs': [{'end': 597.333, 'src': 'heatmap', 'start': 549.937, 'weight': 0.703, 'content': [{'end': 557.018, 'text': 'But keep in mind, let me log in once again, if I enter git log right here, that our structure in the feature branch is this one.', 'start': 549.937, 'duration': 7.081}, {'end': 562.4, 'text': 'So m2, second commit of the master branch, and then first commit in the feature branch.', 'start': 557.318, 'duration': 5.082}, {'end': 572.516, 'text': "So I am in the feature branch and now I enter git rebase and now master, that's the other branch.", 'start': 563.32, 'duration': 9.196}, {'end': 583.744, 'text': 'right, because the master is the branch which has an additional commit and this third commit now should now basically be the base for our feature branch.', 'start': 572.516, 'duration': 11.228}, {'end': 588.267, 'text': "now let's hit enter and see what happens if i do this.", 'start': 583.744, 'duration': 4.523}, {'end': 589.688, 'text': 'something seems to be going on right here.', 'start': 588.267, 'duration': 1.421}, {'end': 597.333, 'text': 'this is good, and if i now clear this once again and now enter git log, we see f1, nothing new.', 'start': 589.688, 'duration': 7.645}], 'summary': 'The feature branch is being rebased onto the master branch, incorporating a new commit as the base for the feature branch.', 'duration': 47.396, 'max_score': 549.937, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CRlGDDprdOQ/pics/CRlGDDprdOQ549937.jpg'}, {'end': 657.526, 'src': 'embed', 'start': 625.278, 'weight': 0, 'content': [{'end': 626.719, 'text': "Let's go back to the feature branch.", 'start': 625.278, 'duration': 1.441}, {'end': 632.423, 'text': "And let me now tell you what happened here, because actually it's quite simple.", 'start': 627.76, 'duration': 4.663}, {'end': 637.568, 'text': 'We were in the feature branch and we entered git rebase master.', 'start': 633.424, 'duration': 4.144}, {'end': 645.517, 'text': 'So the first thing Git does is Git checks both branches and has a look at the last commit both branches have in common.', 'start': 638.268, 'duration': 7.249}, {'end': 653.105, 'text': 'Which commit was that? This was our m2 commit, the commit we used to create our feature branch initially.', 'start': 646.177, 'duration': 6.928}, {'end': 657.526, 'text': 'then git has a look at our current branch.', 'start': 654.224, 'duration': 3.302}], 'summary': 'During rebase, git found m2 commit as common and checked current branch.', 'duration': 32.248, 'max_score': 625.278, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CRlGDDprdOQ/pics/CRlGDDprdOQ625278.jpg'}, {'end': 718.489, 'src': 'embed', 'start': 696.182, 'weight': 2, 'content': [{'end': 706.126, 'text': 'So the feature branch is no longer based on the m2 commit but on the m3 commit and then both branches are aligned again.', 'start': 696.182, 'duration': 9.944}, {'end': 709.847, 'text': 'then Git simply applies this internally saved information.', 'start': 706.126, 'duration': 3.721}, {'end': 716.289, 'text': 'So our F1 change, this change right here, and puts it on top of this M3 commit.', 'start': 710.087, 'duration': 6.202}, {'end': 718.489, 'text': "That's basically everything that's happening.", 'start': 716.849, 'duration': 1.64}], 'summary': 'Feature branch now based on m3 commit, aligns branches, applies saved information, and adds f1 change to m3 commit.', 'duration': 22.307, 'max_score': 696.182, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CRlGDDprdOQ/pics/CRlGDDprdOQ696182.jpg'}, {'end': 809.75, 'src': 'embed', 'start': 780.792, 'weight': 1, 'content': [{'end': 783.333, 'text': "That's what we just achieved with our rebase command.", 'start': 780.792, 'duration': 2.541}, {'end': 792.302, 'text': 'So if I enter here git rebase but now not master because we are in the master at the moment, but feature.', 'start': 784.174, 'duration': 8.128}, {'end': 802.346, 'text': 'What will happen then is that Git will again first have a look at our two branches and see what is the last commit both branches have in common.', 'start': 793.202, 'duration': 9.144}, {'end': 805.167, 'text': 'In our case, this is the M3 commit now.', 'start': 802.666, 'duration': 2.501}, {'end': 809.75, 'text': 'Then Git will analyze our master branch and see what changed.', 'start': 806.267, 'duration': 3.483}], 'summary': 'Using git rebase on feature branch, common commit is m3.', 'duration': 28.958, 'max_score': 780.792, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CRlGDDprdOQ/pics/CRlGDDprdOQ780792.jpg'}, {'end': 921.654, 'src': 'embed', 'start': 875.802, 'weight': 4, 'content': [{'end': 882.592, 'text': 'Merge kind of well combines the information into one single commit at the end if you use this squash command we use.', 'start': 875.802, 'duration': 6.79}, {'end': 889.015, 'text': 'Whereas git rebase, well, simply, as the name says, changes the base of your code.', 'start': 883.232, 'duration': 5.783}, {'end': 896.198, 'text': "As we saw in the feature branch, we suddenly didn't start after the m2 commit anymore, but after the m3 commit.", 'start': 889.335, 'duration': 6.863}, {'end': 901.521, 'text': 'This also brings us to kind of one of the disadvantages of this rebase command.', 'start': 896.398, 'duration': 5.123}, {'end': 905.803, 'text': 'You should never use rebase in public repositories.', 'start': 902.501, 'duration': 3.302}, {'end': 909.426, 'text': 'Using them locally on your machine normally should be fine.', 'start': 906.444, 'duration': 2.982}, {'end': 914.209, 'text': 'So if you work on your own projects but in bigger teams, you can use it,', 'start': 909.506, 'duration': 4.703}, {'end': 918.512, 'text': 'but it can cause serious damage in the end and a lot of work for your colleagues.', 'start': 914.209, 'duration': 4.303}, {'end': 921.654, 'text': "I won't dive into all the details about that right now.", 'start': 919.212, 'duration': 2.442}], 'summary': 'Git rebase changes base of code, use cautiously in public repos.', 'duration': 45.852, 'max_score': 875.802, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CRlGDDprdOQ/pics/CRlGDDprdOQ875802.jpg'}], 'start': 549.937, 'title': 'Git rebase and merge', 'summary': 'Covers the process of rebasing a feature branch onto the master branch using git rebase, updating the base of the feature branch to the latest commit of the master branch, and integrating the third commit from the master branch. it also explains how git rebase changes the base of the code and how git merge combines information into a single commit, while cautioning against using rebase in public repositories.', 'chapters': [{'end': 645.517, 'start': 549.937, 'title': 'Git rebase and branches', 'summary': 'Discusses the process of rebasing a feature branch onto the master branch using git rebase, resulting in the base of the feature branch being updated to the latest commit of the master branch, and the third commit from the master branch being integrated into the feature branch.', 'duration': 95.58, 'highlights': ['The feature branch is rebased onto the master branch using git rebase, updating the base of the feature branch to the latest commit of the master branch.', 'The third commit from the master branch is integrated into the feature branch during the rebase process.', 'The process allows for the feature branch to incorporate changes from the master branch without altering the master branch itself.']}, {'end': 968.748, 'start': 646.177, 'title': 'Understanding git rebase and merge', 'summary': 'Explains the process of using git rebase and git merge, illustrating how git rebase changes the base of the code and how git merge combines information into a single commit, while also highlighting the importance of not using rebase in public repositories.', 'duration': 322.571, 'highlights': ["Git rebase changes the base of your code, as seen in the feature branch, which suddenly didn't start after the m2 commit anymore, but after the m3 commit. Illustrates the impact of git rebase by demonstrating the shift in the base commit from m2 to m3 in the feature branch.", 'Git merge combines the information into one single commit at the end if the squash command is used, as shown in the log where f1 and f2 are combined into a single commit. Explains the merging process in git merge by showcasing the combination of f1 and f2 into a single commit in the log.', 'Importance of not using rebase in public repositories, as it can cause serious damage and a lot of work for colleagues, emphasizing the caution required when using rebase in collaborative environments. Stresses the caution needed when using git rebase in public repositories, highlighting the potential consequences of causing damage and extra work for colleagues.']}], 'duration': 418.811, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/CRlGDDprdOQ/pics/CRlGDDprdOQ549937.jpg', 'highlights': ['The feature branch is rebased onto the master branch using git rebase, updating the base of the feature branch to the latest commit of the master branch.', 'The third commit from the master branch is integrated into the feature branch during the rebase process.', "Git rebase changes the base of your code, as seen in the feature branch, which suddenly didn't start after the m2 commit anymore, but after the m3 commit.", 'The process allows for the feature branch to incorporate changes from the master branch without altering the master branch itself.', 'Importance of not using rebase in public repositories, as it can cause serious damage and a lot of work for colleagues, emphasizing the caution required when using rebase in collaborative environments.', 'Git merge combines the information into one single commit at the end if the squash command is used, as shown in the log where f1 and f2 are combined into a single commit.']}], 'highlights': ['The video compares git rebase and git merge commands and their applications.', 'Illustrates an example project with master and feature branches evolving with commits.', 'Demonstrates two ways to combine the latest commits from feature and master branches.', "The chapter emphasizes the use of 'git merge --squash' to consolidate the feature branch into a single commit and merge it with the master branch, providing a structured way of summarizing all the different commits and changes (Squashing).", 'Git rebase is used to restructure commit history, allowing for a cleaner and more organized display of changes, which can be helpful for tracking the changes made.', 'The feature branch is rebased onto the master branch using git rebase, updating the base of the feature branch to the latest commit of the master branch.', 'The third commit from the master branch is integrated into the feature branch during the rebase process.', 'Importance of not using rebase in public repositories, as it can cause serious damage and a lot of work for colleagues, emphasizing the caution required when using rebase in collaborative environments.']}