check whether current directory is inside a git repo