reset hard on git push
The issue is a difference in how Git commands behave in the environment created for hook scripts versus your normal environment. First, hook scripts run with their current working directory set to the Git directory itself (i.e. the .git/ directory of a non-bare repository). Second, hook scripts run with the GIT_DIR environment variable set and … Read more