how to remove the commits from the branch code example Example: git clear commits git reset --hard origin