When using gitlab webhooks the field "checkout_sha" will always be present. This causes the deployer to execute this block always which can have unwanted side effects.
if (!empty($sha)) {
// write to the log
fputs($file, "*** RESET TO HASH INITIATED ***" . "\n");
exec(GIT . " reset --hard {$sha} 2>&1", $output, $exit);
Of course this makes sense since you do not want to have merge conflicts when using an auto deploy mechanism. In our case we have local sql-lite db running in the webapp that always got deleted although it was never checked in.