1.9 KiB
Magit
Handle all of the git interactions inside of Emacs.
Setup
Deploy the global configuration file for git
1, by default it reads from $HOME/.gitconfig
.
(dotfiles/symlink "~/.emacs.d/config/git" "~/.gitconfig")
Config
Another hallmark feature of Emacs is magit
2. It's a complete git porcelain inside of Emacs. The developer has stressed that it's most unfortunate name was meant to be pronounced like magic but with git. Despire his best efforts a lot of people have taken to pronouncing it maggot, which keeps him awake at night (probably).
(use-package magit :commands magit-status :custom (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
Forge integration
It's possible to interact with forges from Github / Gitlab using forge
3. It requires the respective $TOKEN
to be configured, or an alternative form of authentication. This enables working with pull-requests, code-reviews, and issues from inside of Emacs.
(use-package forge :after magit)
Shortcuts
Interact with magit
2 behind SPC g
:
-
Clone with
c
-
Status with
g
(dotfiles/leader "g" '(:ignore t :which-key "Magit") "gc" '(magit-clone :which-key "Clone") "gg" '(magit-status :which-key "Status"))