Save This: Emacs Magit Command Cheat Sheet

Emacs Magit cheat sheet

The Magit Git interface, for Emacs, provides both trivial and elaborate integration with Git right from within your Emacs text editor. Below, you will find a ready and easy cheatsheet for the basic (and more advanced) Git commands you can run from the Magit interface.

Be sure to check out the Magit quick start guide.

The Very Basics

Here are the commands you will be using most of the time, for basic refreshing of Magit buffers and moving around in the interface:

g
Refresh the current buffer
<tab>
Toggle selection at point
<return>
Visit the item at point
C-h m
Show all key bindings

Remember, you can always press h for a help screen from within the Magit interface.

The Staging Index (Applying Changes)

Now, it’s time to add changes, stage or “unstage”, moving content in and out of your Git staging index:

KeyCommand
aApply
vReverse
kDiscard
sStage
uUnstage
SStage all
UUnstage all

Transient and DWIM “do what I mean” Commands

These commands may look familiar to anyone who has used Git for a while. They will provide most of the day-to-day functionality that most Git users will require to get their work done.

KeyCommand
bBranch
cCommit
CClone
dDiff
DDiff (change)
eEdiff (dwim)
EEdiff
fFetch
FPull
IInit
lLog
LLog (change)
mMerge
MRemote
PPush
rRebase
tTag
XReset
zStash

More Git Resources

Be sure to check out other Git resources available in the support center, like our complete Git fundamentals guide, get up and running with Git in a few minutes.

If you don’t need cPanel, don't pay for it. Only pay for what you need with our scalable Cloud VPS Hosting.

check markCentOS, Debian, or Ubuntu check markNo Bloatware check markSSH and Root Access

VPS vs cloud hosting? Which one is right for you?

CM
Christopher Maiorana Content Writer II

Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog.

More Articles by Christopher

Was this article helpful? Join the conversation!