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

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