Arnis L. Arnis L. - 6 months ago 52
Git Question

Git: permanently remove few commits from remote branch

I know that's rewriting of history which is bad yada yada.

But - how to do that?


You 'git reset' your local branch, and you git push --force your revised local branch to the remote. (other solution here, involving deleting the remote branch, and re-pushing it)

This SO answer illustrates the danger of such a command, especially if people depends on the remote history for their own local repos.
You need to be prepared to point out people to the RECOVERING FROM UPSTREAM REBASE section of the git rebase man page