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
.
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.
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.