I want to start this section on rebasing by telling you a little bit about my own personal history with
rebasing.
It's a command to get rebase is the command that there's a bit of a divide over in the community.
Some people use this command all the time.
Some companies ask that their developers use rebase all the time.
Others avoid it like the plague.
And when I first started, when I first learned Git, I was actually told by the person I was learning
from to try to avoid rebasing ever.
Don't worry about it.
It can really screw things up for you and for other people on your team.
It's not for beginners and some of that is true for sure, but it was kind of, I don't know, a scary
command for me and I avoided it for quite a long time, for many years.
And I got by just fine with Git.
I didn't really run into many issues.
Maybe there was once or twice I had to use it, but I would just google what I needed to do and find
something on StackOverflow.
It just wasn't something I needed to do frequently.
Anyway, one day I was teaching a boot camp a couple of years ago and a student asked me about rebase
and from the rest of the class and I was not all that prepared to give him a good response.
So I went home, did my research, I came back, gave a lecture the next day.
Anyway, it doesn't really matter, but long story short, I use rebase all the time.
Now it can be very useful, but you have to know when not to use it.
There's a golden rule of rebasing and we will focus on that in this section.
So there is a divide within the community because rebasing is an alternative to merging.
There's two different things really that people do with rebasing.
And the first one is you can use git rebase instead of get merge.
So some people like to do that and they'll use Git rebase or some companies will ask their developers
to use Git rebase instead of merging.
But other people get by just fine with git merge and they avoid get rebase.
So there's two big workflows for combining branches.
One is rebasing and one is merging.
So we'll talk about that starting in the next video.
And then the second use case for rebase is to clean up your own commits, clean up your your git history,
and we'll talk about that, too, towards the end.
All right.
So you can get by with just merging things as we have been doing.
Rebase is not, in my opinion, one of the essential commands that you just have to know.
As I said, I used Git for quite a while without really rebasing all that much, but it's definitely
worth knowing about.
And these days I think it's gaining in popularity or at least equal to the git merge crowd.
So let's begin.