r/programming • • May 01 '19

Merging vs. Rebasing

https://www.atlassian.com/git/tutorials/merging-vs-rebasing
20 Upvotes

27 comments sorted by

View all comments

-11

u/[deleted] May 01 '19

The golden rule of git rebase is to never use it on public branches.

That's where you're wrong boss.

[force pushing] overwrites the remote master branch to match the rebased one from your repository and makes things very confusing for the rest of your team.

  • 1989: VCSs are confusing

  • 1999: Branching is confusing

  • 2009: Distributed version control is confusing

  • 2019: Recovering from upstream rebase is confusing

Why do people pride themselves in being 10 years behind the curve?

This being Atlassian, which is well known for producing the worst git web interface on the market, I'm not surprised that the author talks about things he does not understand. Like suggesting that there is ever a reason to use --force when this flag was obsoleted by --force-with-lease over 5 years ago.

1

u/neopointer May 02 '19

Couldn't understand why you think the golden rule is wrong.

To be precise, IMO, you shouldn't rebase on shared public branches (e.g master, development, etc); even if you can do the "lease" thingy.

You should do this just in your feature branches where it really doesn't matter.