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~
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
delete commit
git checkout master
git reset --hard e3f1e37
git push --force origin master
# Then to prove it (it won't print any diff)
git diff master..origin/master
delete commit
git revert dd61ab23
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