Change git repo check from 'show-ref' to 'status'

This is to avoid issues with git repos that do not have commits yet