3 ms·
Ay, no. You can't rewrite history in upstream branches, no (well...[0]), but you _can_ (and should) do it locally. There's this terrible misunderstanding that
by cryptonector 7y ago
Ay, no. You can't rewrite history in upstream branches, no (well...[0]), but you _can_ (and should) do it locally.
There's this terrible misunderstanding that "git rebase means rewriting history, which is bad" when in fact rewriting history locally (before you push upstream) is fine and quite desirable.
[0] In fact you can rewrite history upstream if you really must, but then you have to securely communicate to downstream users how to recover by telling them the previous HEAD commit and the new one so they can use git rebase --onto. If you really wanted to, you could make a habit out of this and make it work just fine. Most projects just aren't set up for this.