git push after git filter-branch rejected git push after git filter-branch rejected git git

git push after git filter-branch rejected


Your use of filter branch has made your repository different to the remote. So as you observe, the remote rejects your push with a warning about this. In this case you are planning to forcibly change the repository to match your filtered version so you can go ahead and push with the force flag. You shouldn't change published repositories like this -- but you can if you want to. Bear in mind anyone who has a clone needs notifying - but if there aren't any others - then go ahead.

If you want to be really careful - make a another clone of the original now. Then do your push. If something ends up wrong - for can always force it back using push --mirror from the backup repository.