Answers for "git command to delete the latest commit"

12

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~
Posted by: Guest on November-27-2020
0

git delete commit

git reset --hard <last_working_commit_id>
Posted by: Guest on April-30-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language