Difference between revisions of "Magit"

From WikEmacs
Jump to: navigation, search
m (category)
(Change magit diff colors)
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Magit is an Emacs mode for working with Git repositories. It provides a convenient interface for the most common Git operations.
+
{{Package
 +
|name=Magit
 +
|description=Git integration for Emacs
 +
|author=Phil Jackson
 +
|maintainer=Phil Jackson
 +
|source=https://github.com/magit/magit
 +
}}
  
== External Links ==
+
'''Magit''' is an Emacs mode for working with Git repositories. It provides a convenient interface for the most common Git operations.
* [http://philjackson.github.com/magit/ Magit Project]
+
 
 +
== Basic setup ==
 +
 
 +
<source lang="lisp">
 +
(add-to-list 'load-path "/path/to/magit/directory")
 +
(require 'magit)
 +
</source>
 +
 
 +
== Helpful keybindings ==
 +
 
 +
* {{Command|magit-status}} is the main entry point to Magit. The author recommends [[Key_Bindings|binding]] this command to "a key of your choice". {{Keys|C-x g}} is a common choice:
 +
{{Snippet|(global-set-key (kbd "C-x g") 'magit-status)}}
 +
 
 +
The [http://magit.github.com/magit/magit.html official Magit documentation] is excellent and should be consulted for further information.
 +
 
 +
== Common Customization ==
 +
 
 +
=== Change magit diff colors ===
 +
 
 +
If you want more common colors (green and red), instead of psyche highlighting:
 +
 
 +
(eval-after-load 'magit
 +
    '(progn
 +
    (set-face-foreground 'magit-diff-add "green3")
 +
    (set-face-foreground 'magit-diff-del "red3")
 +
    (when (not window-system)
 +
      (set-face-background 'magit-item-highlight "black"))))
 +
 
 +
=== Use ido to checkout branches ===
 +
 
 +
(setq magit-completing-read-function 'magit-ido-completing-read)
 +
 
 +
== See Also ==
 +
 
 +
* [[Version Control]]
 +
* [[Git]]
 +
* [[MagitHub]]
 +
 
 +
== Project Pages ==
 +
 
 +
* [https://github.com/magit/magit GitHub Repo]
 +
* [http://magit.github.com/magit/ Magit Project]
 
* [http://github.com/magit/magit/downloads Downloads]
 
* [http://github.com/magit/magit/downloads Downloads]
* [http://philjackson.github.com/magit/magit.html Documentation]
+
* [http://magit.github.com/magit/magit.html Documentation]
* [https://github.com/magit/magit Source (github)]
+
  
[[Category:Version Control]]
+
[[Category:Version Control]][[Category:Convenience]][[Category:Third Party Package]]

Revision as of 08:59, 16 January 2014

Magit
Description Git integration for Emacs
Author Phil Jackson
Maintainer Phil Jackson
Source https://github.com/magit/magit

Magit is an Emacs mode for working with Git repositories. It provides a convenient interface for the most common Git operations.

Basic setup

(add-to-list 'load-path "/path/to/magit/directory")
(require 'magit)

Helpful keybindings

  • M-x magit-status is the main entry point to Magit. The author recommends binding this command to "a key of your choice". [C-x g] is a common choice:
(global-set-key (kbd "C-x g") 'magit-status)

The official Magit documentation is excellent and should be consulted for further information.

Common Customization

Change magit diff colors

If you want more common colors (green and red), instead of psyche highlighting:

(eval-after-load 'magit
   '(progn
    (set-face-foreground 'magit-diff-add "green3")
    (set-face-foreground 'magit-diff-del "red3")
    (when (not window-system)
      (set-face-background 'magit-item-highlight "black"))))

Use ido to checkout branches

(setq magit-completing-read-function 'magit-ido-completing-read)

See Also

Project Pages