This repository was archived by the owner on Oct 19, 2024. It is now read-only.

Description
If somebody has a default empty production database in their repository in the db directory, then their database is overwritten with every deploy due to the git reset --hard origin/master.
I think a better option would be to first check for working directory for changes to files that are in the repo... e.g. git diff HEAD --numstat.
It should then output a warning about the file having been changed despite existing in the repo. At that point you could fail the deploy until the issue is resolved. If you wish the deploy to continue no matter what, then you could git stash first, so that these changes are not lost (just in case it's something like a production database).