Let suppose that we want to undo "Robot Framework installation"
You can either create a new commit that cancel that change or move two commits backward. We recommend you to always choose the first option for obvious reasons : do not rewrite the commit history.
Create the branch 'rollback-install-robot' that will be used to perform the rollback
git checkout -b rollback-install-robot main
Perform the rollback on that branch
git revert HEAD~2
Add the following commit message : 'Cancel Robot Framework installation'
Notice that there are errors. Abort the revert operation
git revert --abort
Revert the merge commit named "install robot framework"
Show a figure to resume the chapter
Let suppose that we want to undo "Robot Framework installation"
You can either create a new commit that cancel that change or move two commits backward. We recommend you to always choose the first option for obvious reasons : do not rewrite the commit history.
Create the branch 'rollback-install-robot' that will be used to perform the rollback
git checkout -b rollback-install-robot main
Perform the rollback on that branch
git revert HEAD~2
Add the following commit message : 'Cancel Robot Framework installation'Notice that there are errors. Abort the revert operation
git revert --abort
Revert the merge commit named "install robot framework"
git revert 4c31d71b5b79cce125c688bac28c876707dac7a6
Modify the commit message and save with ":wq"
Notice that there is a new commit related to the revert of robot framework installation
Now revert the commit named "install Ansible"
git revert 2a0c83a3f0764a4e0579e84ec2aa7c508378027e
Push the branch and merge it into main branch
git push github rollback-install-robot
git fetch github -p
git checkout main
git branch -D rollback-install-robot
git pull github main