From the course: Use Git Like a Pro by Pearson
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
Merging vs. rebasing
From the course: Use Git Like a Pro by Pearson
Merging vs. rebasing
Let's recap the differences between merging and rebase. So we saw that with merging, it's going to be a three-way merge, which means Git is going to create an additional merge commit. However, with rebasing, no merge commit is created because it's always a fast-forward merge. Now, whether to use Merge or Rebase, it depends on your personal preference, or also on what you have decided as a team in your project. Some people like to see the cleaner history, so they prefer Rebase. However, there are different benefits of using Merge, so some people prefer Merging. The major benefit of Rebasing is that you get a much cleaner project history. There are no unnecessary merge commands required by git merge. So git rebase creates a linear history which makes it easy to navigate the project with git log or git bisect commands. However, there are also some pitfalls using git rebase. Since git rebase rewrites the history, it can be dangerous in terms of collaboration if you don't follow the golden…
Contents
-
-
-
-
-
-
-
-
(Locked)
Learning objectives1m 1s
-
(Locked)
Merging theory and concepts6m 5s
-
(Locked)
Merging in practice10m 59s
-
(Locked)
Rebase theory and concepts2m 53s
-
(Locked)
Rebase in practice10m 12s
-
(Locked)
Merging vs. rebasing3m 26s
-
(Locked)
Create pull requests19m 41s
-
(Locked)
Summary and exercise3m 36s
-
(Locked)
-
-