how to stop a git commit code example Example: git delete local commit git reset --hard origin/<branch_name>