use mixin to add 'is git repo' check for some commands

When those commands are used outside a git repo, 'Not a git repo!' will be
printed to stderr