the 'git stash' still needs to be addressed here, as it will fail and break the chain of execution when there is nothing to stash. Maybe:

```bash
cd $DATABASE_MIGRATION_SOURCE_DIR ; git stash clear && git stash save ; git fetch -q origin && git checkout -q origin/master
```