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

Опубликовано: 19 Октябрь 2024
на канале: EduRise
9,536
141

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