#!/usr/bin/env bash

# We launch the command in a subshell to avoid impacting the true environment with our unset.
# We unset GIT_DIR because it points to the wrong directory.
# We are in the .git directory when this hook is run, so we need to move one step up to run git commands.
# We then force a checkout of the repo to discard any changes.
( unset GIT_DIR && cd .. && git checkout -f )
