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.
- The Very Basics
- The Staging Index (Applying Changes)
- Transient and DWIM “do what I mean” Commands
- More Git Resources
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:
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.
Key | Command |
---|---|
b | Branch |
c | Commit |
C | Clone |
d | Diff |
D | Diff (change) |
e | Ediff (dwim) |
E | Ediff |
f | Fetch |
F | Pull |
I | Init |
l | Log |
L | Log (change) |
m | Merge |
M | Remote |
P | Push |
r | Rebase |
t | Tag |
X | Reset |
z | Stash |
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.
CentOS, Debian, or Ubuntu No Bloatware SSH and Root Access
VPS vs cloud hosting? Which one is right for you?