# When you accidently commit or do unnecessary commit in the remote
// you can fix this way.
⚠️ Warning: Your commit won't be saved.
#reset the last commit
git reset HEAD^ --hard
#force push the current changes
git push origin --force
# to save your commit
git reset --soft HEAD~1
#stash the changes and then force the changes