Magit depends on the
with-editor libraries which are available from Melpa and Melpa-Stable.
Install them using
M-x package-install RET <package> RET. Of course
you may also install them manually from their repository.
Then clone the Magit repository:
$ git clone https://github.com/magit/magit.git ~/.emacs.d/site-lisp/magit $ cd ~/.emacs.d/site-lisp/magit
Then compile the libraries and generate the info manuals:
If you haven’t installed
with-editor from Melpa or at
/path/to/magit/../<package>, then you
have to tell
make where to find them. To do so create the file
/path/to/magit/config.mk with the following content before running
LOAD_PATH = -L /path/to/magit/lisp LOAD_PATH += -L /path/to/dash LOAD_PATH += -L /path/to/ghub LOAD_PATH += -L /path/to/graphql LOAD_PATH += -L /path/to/magit-popup LOAD_PATH += -L /path/to/treepy LOAD_PATH += -L /path/to/with-editor
Finally add this to your init file:
(add-to-list 'load-path "~/.emacs.d/site-lisp/magit/lisp") (require 'magit) (with-eval-after-load 'info (info-initialize) (add-to-list 'Info-directory-list "~/.emacs.d/site-lisp/magit/Documentation/"))
Note that you have to add the
lisp subdirectory to the
the top-level of the repository, and that elements of
not end with a slash, while those of
Instead of requiring the feature
magit, you could load just the
autoload definitions, by loading the file
Instead of running Magit directly from the repository by adding that
load-path, you might want to instead install it in some other
sudo make install and setting
To update Magit use:
$ git pull $ make
At times it might be necessary to run
make clean all instead.
To view all available targets use
Now see Post-Installation Tasks.