> git reset --hard THE_HASH_YOU_WANT_TO_RETURN_TO
# That's our good commit
> git rebase -i origin/master
# During the rebase, I squashed all but the top commit to make it one giant commit.
# Gives us a single commit with all of the things that changed since the good commit. That commit was HASH_OF_ALL_CHANGES_SINCE_GOOD_COMMIT
> git revert HASH_OF_ALL_CHANGES_SINCE_GOOD_COMMIT
# That makes a negative commit of that one giant commit named REVERT_OF_ALL_CHANGES_SINCE_GOOD_COMMIT
> git reset --hard origin/master
# Back to reality
> git cherry-pick REVERT_OF_ALL_CHANGES_SINCE_GOOD_COMMIT
# applies a change that reverts all changes since THE_HASH_YOU_WANT_TO_RETURN_TO
After that, just push!
No comments
Post a Comment