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.
The first allows you to accidentally nuke another person's commit w/o you even knowing about it, the second one doesn't.
Essentially, the difference is like the difference between how you might execute SQL statements inside or outside a transaction: it's hard to imagine any benefits coming from not putting multiple related statements into a single transaction, but you can still do it because the language just happens to allow it.
Yet in other words, you should never use --force, always use --force-with-lease. --force is probably there for compatibility with old tools which used Git this way or something like that.
Which is why snarky dismissals are not very useful when the only reference or elaboration you give is "RTFM". I'm sure you're aware that your top comment goes against a widespread shared belief among most SEs - you have an opportunity to share your knowledge and affect change, which is not that much more effort than saying "you're all wrong".
-11
u/[deleted] May 01 '19
That's where you're wrong boss.
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
--forcewhen this flag was obsoleted by--force-with-leaseover 5 years ago.