git delete all changes since last commit code example
Example 1: remove last commit git
git reset --hard HEAD^
git push origin -f
Example 2: remove the last commit git without losing changes
git reset HEAD~1 --soft
git reset --hard HEAD^
git push origin -f
git reset HEAD~1 --soft