I have sent a PR and that is merged to the repository. Suppose that PR no. is 127 and that PR contained following commits in order (most recent first)
hdyw6
cnsfg
and then I sent another PR no. 128 which had following commits in it
6dwiu
sbyww
(suppose there was only one commit in PR no. 126 i.e. commit jdus7
)
Now I realized something wrong got committed and now I want to bring back the repository to the stage just before PR 127. That means I want to keep the commit till jdus7
(that was in PR no. 126)
So how to do that?
Would I have to keep reverting commit one by one (starting from most recent), something like this?
git revert sbyww
git revert 6dwiu
git revert cnsfg
git revert hdyw6
and now finally all bad commits are gone? Please correct me if that is not it will work or any better way to do that?
Or there is something where instead of reverting one by one I just say git reset back till jdus7