Reputation: 625
I have reverted some code and pushed into a remote git repository. How can I "un revert" the changes even though it was pushed into a remote repository.
Please find below what I have done:
git revert commit_id
git push origin branch_name
Now can I undo the revert?
Upvotes: 1
Views: 1798
Reputation: 141770
Your change has been push
ed. Do not change others' history!
git checkout branch_name
git revert revert_id
git push origin branch_name
Upvotes: 3