Here\'s what I did on my supposed-to-be-stable branch...
% git rebase master
First, rewinding head to repla
Scenario 1: If you want to undo the last commit say 8123b7e04b3, below is the command(this worked for me):
git push origin +8123b7e04b3^:
Output looks like below:
Total 0 (delta 0), reused 0 (delta 0)
To https://testlocation/code.git
+ 8123b7e...92bc500 8123b7e04b3^ -> master (forced update)
Additional info: Scenario 2: In some situation, you may want to revert back what you just undo'ed (basically undo the undo) through the previous command, then use the below command:
git reset --hard 8123b7e04b3
Output:
HEAD is now at cc6206c Comment_that_was_entered_for_commit
More info here: https://github.com/blog/2019-how-to-undo-almost-anything-with-git