Magit is available from Melpa and Melpa-Stable. If you haven’t used
Emacs’ package manager before, then it is high time you familiarize
yourself with it by reading the documentation in the Emacs manual, see
(emacs)Packages. Then add one of the archives to
package-archives
:
(require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(require 'package) (add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
Once you have added your preferred archive, you need to update the local package list using:
M-x package-refresh-contents RET
Once you have done that, you can install Magit and its dependencies using:
M-x package-install RET magit RET
Now see Post-Installation Tasks.