Skip to content

Latest commit

 

History

History
101 lines (63 loc) · 2.54 KB

presentation.org

File metadata and controls

101 lines (63 loc) · 2.54 KB

Magit

What is it?

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?

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

Command Line?

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.

Magit Position

magit-position.png

But Wait, There’s More!

Using Gerrit requires a straight history with no twigs making divisions.

no-twigs.png

Good idea, but means re-basing… Magit shines with interactive rebasing.

How to Learn?

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

Summary

Questions?