3 ms·
Great set of tips. Unfortunately I find that so many post that suggest rebase recommend against force pushing. This takes a lot of the power away from rebase/am
by K0nserv 11y ago
Great set of tips. Unfortunately I find that so many post that suggest rebase recommend against force pushing. This takes a lot of the power away from rebase/amend. So much does this happen that is wrote a blog post titled "You should force push more"[0].
0: https://hugotunius.se/2014/09/08/you-should-force-push-more.html https://hugotunius.se/2014/09/08/you-should-force-push-more....
- friendzis 11y agoMy current understanding is that... "it depends". I like that you identified ground rules/preconditions for aggressive force-pushing. Imagine a scenario for a large team (think kernel). Chat logs of a team developing some feature look something like: A: Ok, I have finished with issue1, check out commit abcd1 B: Hm, does not work for me. Looks like race condition in foo.c, fixed in abce2. Going to sleep. C: You broke init_foo(), reverted in qwer3 A: Ok, modified init_bar() works on my machine, check dvor4 C: LGTM Yet release branch contains all those commits squashed into abcd1. Now person B (or anyone else) has no idea whether which versions of init_foo() and init_bar() work on their machine and what to fix. We sometimes tend to forget (and tools like github/gitlab help with that) that not only git, but the whole workflow might be distributed and changing history in one place might desync it with other places. I think that unless all that history is absolutely unnecessary, e.g. done by a single developer, is extremely well tested, contains loads of "oops" commits, history should not be messed with. That's why all the warnings: git cannot manage all the references to history