1

How can I do a git rebase -i after I do a git push? I read that I can't edit history after I do git push.

3

You can edit history after a push, it's just not recommended. In fact, rebasing in general is not recommended.

git push -f will update the remote after a rewrite. If you have other people reading that source then doing a push -f after rewriting will mess up their repos.

1

I think that you are interested about:

man git-filter-branch

All necessary stuff is in there. There are also some examples. See also man git-rebase, man git-push. It's all explained there, just take your time to read it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.