Git is probably the most universal tool for software developers these days and understanding its nuances is key to a developing career.
The Practical DevI know Git, depending on what you mean by "know".17:58 PM - 08 Aug 2016
You can get by with a limited grasp, but you are going to want to improve over time.
git rebase is one of those commands that causes a lot of ongoing confusion, it's an evergreen topic to say the least.
I'm not the one to properly explain it to you but I wanted to share some of the awesome dev.to resources that have come to create quite the nice learning library.
The content on this subject goes pretty deep and there is much more than just these posts, but they are a great source. Jason chatted a bit about git rebase in his AMA last year. That post was a treasure trove of git knowledge overall.
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.