Answers for "how to remove all local commits that have not been pushed without deleting changes"

12

git remove commit before push

# 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

remove commit not pushed

git reset --hard origin/main
Posted by: Guest on June-04-2021

Code answers related to "how to remove all local commits that have not been pushed without deleting changes"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language