Show an error message if git is missing, fixes #3297
Ignore preferGlobal for dependencies