Hacker News new | ask | show | jobs
by chucky 1630 days ago
> Did you ever need to do git rebase --continue over and over again just to get your own branch up to date?

Not really. The secret is to rebase fairly often, at the very least daily (depending on the size of the organization you work in, this could be more often). I often see complaints like this from junior devs. They work in isolation on their branch for a week, and then they complain about how hard it is when they try to do a rebase on top of the 100+ commits that happened while they were out there doing their own thing.

Another common issue comes from not understanding how rebase works well enough. You are supposed to adjust just the changes of this commit, not take anything else into account. If you start making unrelated changes when rebasing, your commits will soon conflict with each other, which means you'll run into a lot of very confusing conflicts.

It's fine to squash before a rebase if you are not interested in the history of your branch. But if you are, it's just not an acceptable solution.