git undo commit
# Uncommit the changes
git reset --soft HEAD~1
# Completely delete the changes
git reset --hard HEAD~1
git undo commit
# Uncommit the changes
git reset --soft HEAD~1
# Completely delete the changes
git reset --hard HEAD~1
git remove commit
# Removes latest commit from the stash, KEEPS changes
git reset --soft HEAD~
# Removes latest commit from the stash, DELETES changes
git reset --hard HEAD~
how to delete a commit from a branch
# How to stash and remove a commit from a branch that has already been pushed
git stash save "<comment>"
git stash pop
# git stash list
git reset --hard HEAD~1
# 1 stands for the amount of commits to go back from HEAD
git push origin HEAD --force
git delete commit
git reset --hard <last_working_commit_id>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us