how to remove all commits for the current status code example Example: git remove all local commits git reset --hard origin/<branch_name>