Emacs magit-mode

洋蔥工作室

Emacs Magit

  • Magit 是 Git 的 Emacs 介面
  • Magit 期望成為 Git 的 porcelain 就像 git (command line) 一樣
  • 使用 mini buffer 來做介面

Youtube 影片

安裝

(use-package magit
  :ensure t
  :bind (("C-x g" . magit-status)))

使用 C-x g ?

Popup and dwim commands
 A Cherry-picking    b Branching         B Bisecting         c Committing
 d Diffing           D Change diffs      e Ediff dwimming    E Ediffing
 f Fetching          F Pulling           l Logging           L Change logs
 m Merging           M Remoting          o Submodules        O Subtrees
 P Pushing           r Rebasing          t Tagging           T Notes
 V Reverting         w Apply patches     W Format patches    X Resetting
 y Show Refs         z Stashing          ! Running           % Worktree

Applying changes
 a Apply          s Stage          u Unstage
 v Reverse        S Stage all      U Unstage all
 k Discard

Essential commands
 g     refresh current buffer
 TAB   toggle section at point
 RET   visit thing at point
 C-h m show all key bindings