def METHOD_NAME(amount):
    res = subprocess.run(['git', 'reset', ('HEAD~%s' % amount)], capture_output=True)
    if res.returncode != 0:
        logging.error('The git reset call returned an error status code %d', res.returncode)
        logging.debug('stdout: %s', res.stdout)
        exit(1)