🤔 What’s the difference between MERGING and REBASING in Git? #git #programming #shorts

preview_player
Показать описание
Which to use? The answer may depend on how whether rewriting commit history affects your workflow.

#programmingtips #developer #learning
Рекомендации по теме
Комментарии
Автор

In my experience rebasing causes all sorts of headaches. Stick to merging and clean small commits. The only time where rebasing is really useful is if you have *local* commits and you want to pull commits from your coworkers on that same branch.

Mobin
Автор

It's not "moving the commits"! This is a dangerous misconception. A commit is immutable, it can't be moved. What it does is more like CLONING the commits. But they are technically different commits now. Understanding the difference and its implications is crucial to avoid the pitfalls of rebasing.

vibovitold