Delete commits fully
Get the logs for the last commits
git log -n 3
# 3 means to list the latest 3 commits2. Rebase to the previous commit that you want to commit to
git rebase -i 77d55bd72c63d43cc83f9c0fea4990c33527c2a63. Should enter a screen where you should pick the commit that you want

3. Commit the changes
git push -f origin masterAnother option
Use the following code to reset head
git reset HEAD^
git push origin +HEADLast updated