---
title: "Save This: Emacs Magit Command Cheat Sheet"
description: "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..."
url: https://www.inmotionhosting.com/support/edu/emacs/emacs-magit-cheat-sheet/
date: 2021-08-04
modified: 2021-11-02
author: "Christopher Maiorana"
categories: ["Emacs"]
type: post
lang: en
---

# Save This: Emacs Magit Command Cheat Sheet

![Emacs Magit cheat sheet](https://www.inmotionhosting.com/support/wp-content/uploads/2021/08/Emacs-Magit-Cheat-Sheet-1024x538.png)

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](#very-basics)
- [The Staging Index (Applying Changes)](#staging-index)
- [Transient and DWIM “do what I mean” Commands](#commands)
- [More Git Resources](#resources)

Be sure to check out the [Magit quick start guide](https://www.inmotionhosting.com/support/edu/emacs/magit/).

## 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:

gRefresh the current buffer
<tab>Toggle selection at point
<return>Visit the item at point
C-h mShow 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:

| Key | Command |
| --- | --- |
| a | [Apply](https://www.inmotionhosting.com/support/website/git/stash-apply/) |
| v | Reverse |
| k | Discard |
| s | [Stage](https://www.inmotionhosting.com/support/website/git/how-to-add-files-to-git-2/) |
| u | Unstage |
| S | Stage all |
| U | Unstage 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.

| Key | Command |
| --- | --- |
| b | [Branch](https://www.inmotionhosting.com/support/website/git/git-fundamentals-complete-beginner-guide/#branches) |
| 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](https://www.inmotionhosting.com/support/website/git/setting-up-your-remote-repository-with-git/) |
| P | Push |
| r | [Rebase](https://www.inmotionhosting.com/support/website/git/git-rebase/) |
| t | [Tag](https://www.inmotionhosting.com/support/website/git/how-to-sign-tags-and-commits-with-git-2/) |
| X | Reset |
| z | [Stash](https://www.inmotionhosting.com/support/website/git/stash/) |

## More Git Resources

Be sure to check out other Git resources available in the support center, like our [complete Git fundamentals guide](https://www.inmotionhosting.com/support/website/git/git-fundamentals-complete-beginner-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](https://www.inmotionhosting.com/cloud-vps).

![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)CentOS, Debian, or Ubuntu ![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)No Bloatware ![check mark](https://design.inmotionhosting.com/assets/icons/standard/check-blue.svg)SSH and Root Access

[VPS vs cloud hosting](https://www.inmotionhosting.com/cloud-vs-vps)? Which one is right for you?
