Suppose I am in a folder called local-projects. Using the terminal, I can do:

[pedro@system:~/quicklisp/local-projects]$ pwd


An important information to highlight is that local-projects folder is not under git control. Even so and still using the terminal, I can do:

[pedro@system:~/quicklisp/local-projects]$ git clone git@github.com:muyinliu/jsown-utils.git

This works, Ok.

So, I wished I could do git clone using Magit great interface. There is a command for C (capitalized C) which is to clone.

Thus, using dired I decide to go to the folder ~/quicklisp/local-projects. But, when I execute the command to invoke Magit with magit-status, Magit asks me the following:

Create repository in /home/pedro/quicklisp/local-projects/? (y or n)

I answer n. In shell, there is no such a question. Not sure if I missed something, but it seems inappropriate to answer y, thus, I choose n.

Did I miss something?

Is it possible to achieve the same result as git clone ... in shell using Magit [1] ?

[1] - By the same result I am including the side effects of the process.

  • 1
    The question isn't related to Emacs or Magit. The are many layers to unpack here: version control systems, git and git interfaces (command line, magit, etc). Magit asks you if you want to clone the repository in the current directory. In the command line, cloning the "tomato" repository means creating a new "tomato" folder and dumping it in there. Does that make sense?
    – aadcg
    Mar 24 at 22:48
  • 1
    Concretely, use M-x magit-clone and define the destination folder instead of running magit-status from a given folder.
    – aadcg
    Mar 24 at 22:50

1 Answer 1


I think the problem is that you are doing magit-status, presumably so you can use the C binding to do the clone. But the doc for magit-status says:

If the current directory isn’t located within a Git repository, then prompt for an existing repository or an arbitrary directory, depending on option ‘magit-repository-directories’, and show the status of the selected repository instead.

If you did M-x magit-clone directly (i.e. what C is bound to in magit-mode-map), then you won't get the question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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