added check if the local repo is initialised yet

if not we init it