Git Rebase vs Git Merge - Keep your branch always in sync with Master

preview_player
Показать описание
What should I use Git Rebase or Git Merge?
This is more of a personal preference, teams decide their strategy, but if you're working on your local branch and/or you're the only one working on the feature branch you should do "rebase".
Working with a team, you should use "merge"

Git Merge Command: git merge master
Git Rebase Command: git rebase master

Inspiration behind this video:
Our Sr. Software always preferred to use rebase, and I have mostly used "git merge". It's simple to use and does what I expect it to do. But was super curious as to how and why they were doing it. Once I was pair programming with one of my senior (Ezra) and he showed me his Git skills and that was the moment I decided I wanted to learn how to do "rebase" and I will learn as best as I can.
My motivation why I decided to come up with this video are a few people, and would like to give credits to them:
Siobhan, Igor, Ezra, Katie, Tatiana, Sir Thads and few more
Рекомендации по теме
Комментарии
Автор

My gowd...this was once of the finest explanations I have seen..Thank you so much

anonymous_devil
Автор

well explained with real time scenario's . Thank you!!

kmrathnam
Автор

Great - finally someone explained is easily.

patrycjaio
Автор

In 22:54 instead of merging Jerry into master, can I rebase Jerry into master? so that I can also keep a copy of Jerry's commits..

(Jerry Branch)
git rebase master

git checkout tom
git rebase jerry
(fix conflict...)
git rebase --continue
..done..


This is the Graph

O - Tom Commit 2
|
O - Tom Commit 1
|
O - Jerry Commit 2
|
O - Jerry Commit 1
|
O - master



Feel free anyone to correct if I'm wrong. Thank you very much in advance. 🙏

brylontoc
Автор

Well Explained, in easy language, totally 5 star ⭐ video.... Always Rocking 🙌

AhaanSethMusic
Автор

Well-explained and nicely organized flow. Thank you 😊

lakshikaamarasinghe