Skip to content

Using magit to do my git commits

June 22, 2012

Magit is a fantastic Emacs extension for managing git commits.  If you’re an emacs and git user you definitely want to check it out.  If you’re not constantly working inside Emacs though it can be a pain to fire it up, invoke magit then run your magit commands.  I often find myself on the command line wanting to do a quick commit.  To avoid running more steps than absolutely necessary I set up a simple alias:

alias magit=’emacs -nw –eval “(progn (magit-status \”.\”) (delete-other-windows))”‘

This fires up emacs in terminal mode and invokes magit automatically.   Since magit tends to split the frame into two windows I’ve included a command to close the non-magit window by default.

Advertisements

From → Technical

One Comment
  1. alias magit=’emacsclient -c -e “(magit-status \”$PWD/\”)”‘

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: