Magit is a Git Porcelain for Emacs
This evening has two goals:
- Brief introduction to Magit … Just enough to get you started
- Demo to show Magit is compelling
Magit version 2.1 requires:
- Emacs 24.4
- Git 1.9.4
Porcelain is interface, plumbing is underneath.
- Graphical Git Interfaces:
- Don’t play well with your files
- Pretty, but separate from your work flow
- IDEs extensions to existing VCS:
- Think:
[[http://www.gnu.org/software/emacs/manual/html_node/emacs/Version-Control.html][C-x v]]
… - Expects standard behavior for git
- No git-specific features… can’t:
- create branches
- rebase
- squash commits
- Think:
Command line is a Porcelain:
- Need to use commit IDs:
git rebase -i 4205ac43
git rebase -i HEAD~3
- Lots of typing. Aliases fix that.
- Error feedback is good…for a CLI
While not a bad interface, Magit actually improves it.
Using Gerrit requires a straight history with no twigs making divisions.
Good idea, but means re-basing… Magit shines with interactive rebasing.
Jump right in! M-x package-install magit
(require 'magit)
(global-set-key (kbd "C-x g") 'magit-status)
Clone github.com/howardabrams/magit-demo
Run: gitrepo-history-conflict.sh
Run: gitrepo-history-nice.sh
- Home Page: github.com/magit/magit
- Online Tutorials and Books:
- Magit Documentation and Info Mode
- Mastering Emacs, by Mickey Peterson
- Magit Cheatsheet, by Daemian Mack
- Other Package Integrations:
- Gerrit: github.com/terranpro/magit-gerrit
- Github: github.com/sigma/magit-gh-pulls