I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1.9 KiB

Magit

Handle all of the git interactions inside of Emacs.

Setup

Deploy the global configuration file for git1, by default it reads from $HOME/.gitconfig.

(dotfiles/symlink "~/.emacs.d/config/git"
                  "~/.gitconfig")

Config

Another hallmark feature of Emacs is magit2. 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 forge3. 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 magit2 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"))

Footnotes