Magit can be configured on a per-repository level using both Git variables as well as Emacs options.
To set a Git variable for one repository only, simply set it in
/path/to/repo/.git/config instead of
the git-config(1) manpage.
Similarly, Emacs options can be set for one repository only by editing
/path/to/repo/.dir-locals.el. See (emacs)Directory Variables.
For example to disable automatic refreshes of file-visiting buffers in
just one huge repository use this:
((nil . ((magit-refresh-buffers . nil))))
It might only be costly to insert certain information into Magit buffers for repositories that are exceptionally large, in which case you can disable the respective section inserters just for that repository:
((magit-status-mode . ((eval . (magit-disable-section-inserter 'magit-insert-tags-header)))))
This function disables the section inserter FN in the current
repository. It is only intended for use in
If you want to apply the same settings to several, but not all, repositories then keeping the repository-local config files in sync would quickly become annoying. To avoid that you can create config files for certain classes of repositories (e.g. "huge repositories") and then include those files in the per-repository config files. For example:
[include] path = /path/to/huge-gitconfig
[status] showUntrackedFiles = no
(dir-locals-set-class-variables 'huge-git-repository '((nil . ((magit-refresh-buffers . nil))))) (dir-locals-set-directory-class "/path/to/huge/repo/" 'huge-git-repository)