I'm maintaining several git repositories using magit, and their numbers keep growing. Is there a way to inform magit of all these projects so that a single command would present a summary of the status of each one instead of manually running magit-status on each one of them ?


3 Answers 3


Is there a way to inform magit of the list of all these projects...

Yes, see magit-repository-directories and magit-repository-directories-depth.

...so that a single command would present a summary of the status of each one

At the time this question was asked such a command did not exist, but now it does. Try M-x magit-list-repositories and see the documentation : (https://magit.vc/manual/magit/Repository-List.html).

You can also list all submodules of a super-repository in a similar fashion using M-x magit-list-submodules. Or you can show some of that information directly in the status buffer using:

(magit-add-section-hook 'magit-status-sections-hook

Then all the modules are listed in a separate section. Modules with changes are listed as usual in Staged changes and Unstaged changes. RET on any of these modules shows the status buffer for that repository and q takes you back to the status buffer of the super-repository.

Submodules can be fetched using f m.

  • Thanks, the submodules seem the way to go. Should I clone my various git repos in this new super-project (and go through some tedious configuration for each one) or can I just move the directories in a common one and then declare each as a submodule?
    – wilk
    Dec 30, 2015 at 23:17
  • 1
    You could mv the repositories, but then you would still have to git submodule add git://<module> <module> each one of them, but that at least is better than having to setup all the remotes and branches again.
    – tarsius
    Dec 30, 2015 at 23:21
  • It seems to be <kbd>f m<kbd> instead of <kbd>F m<kbd> to fech submodules.
    – wilk
    Feb 10, 2016 at 9:48

Having felt a similar need for managing multiple git repositories simultaneously, I've tried to come up with a solution: https://github.com/luismbo/multi-magit.


Im using simple emacs lisp script which works surprisingly well for me:

(setq projects '(
     "... any other number of remaining repos"))

(defun show-dashboard ()
  (cl-loop for project in projects
    do (magit project)))

Then I'm creating a key binding like so:

  (global-set-key (kbd "C-x C-p") 'show-dashboard)

And that's it. It should show grid of all your git repos. You can then feely manipulate those windows and hit key binding again to go back to the dashboard.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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