DEV Community

loading...

Discussion on: I'm a Git Master, Ask Me Anything

Collapse
gonedark profile image
Jason McCreary Ask Me Anything • Edited

The reason people shy away from rebase is because it rewrites history - meaning it changes the commit SHAs. So if you're sharing your work with others, that can be a problem.

It's likely this consultant was the victim of a force push and made a sweeping statement to never use rebase again. We've all been there. It's frustrating.

Being mindful of which commands, like rebase, can rewrite history resolves this issue. Then you can use it appropriately. For example, I use rebase often. But I do so at the end - right before merging - so I limit the chance for it to affect other developers.

Collapse
adikul30 profile image
Aditya Kulkarni

Could you please elaborate on how it can affect others ? I have recently started using rebase working with my friends and have found it easy to simplify the merging.