How can I revert the last two commits on my mainline branch without issuing a change request (CR)?
I accidentally committed two changes – let’s say commit98, commit99 — to mainline. So now the mainline branch moved to commit99 from commmit97
I wanted to revert the last two changes and put the mainline back to commit97.
Also I am not supposed to directly push code changes to the repository without a CR (change request).
So, I wanted the changes locally so that I can create a CR (change request).
11 Answer
Create a new branch:
git checkout -b some_branchThen:
git rebase -i the_first_commit_you_want_to_modify^Then adjust the order of commit.
2