This question already has an answer here:

magit-version: Magit 20170407.2107, Git (unknown), Emacs 25.1.1, darwin git version 2.12.2 OS x 10.12.4

git status on command line works fine git rev-parse --git-dir gives .git

magit-status asks for a directory, then asks to "Create repository in xxx?", then "user-error: Not inside a Git repository"

Any ideas?

marked as duplicate by npostavs, Stefan, Drew, Francesco, JeanPierre Apr 27 '17 at 20:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


So the answer for me was:

(use-package exec-path-from-shell
   :if (memq window-system '(mac ns))
   :ensure t

in my init.el

Not the answer you're looking for? Browse other questions tagged or ask your own question.