Space g s runs Magit status, showing the status of the local git repository and any attached remote repositories. Magit status is a full Git client and can run any Git commands.
? shows all the command menus available for committing
g r to refresh Magit status buffer
Navigating Magit Status bufferλ︎
j and k to move to next / previous line
[ and ] jumps to next / previous section at the current level
Tab to expand a section
Using Magit status directlyλ︎
If you run git status from a file that is not currently in a git project, magit will prompt you to create a git project, allowing you to select the root of the project directory
- confirm you want to create a git repository
- specify where to create the repository, the root directory for the git repository
Create new project with magit-repository-directories configured
magit-repository-directories can be defined with with a collection of directories, used by helm pop-up menu will list the Git repositories within those directories rather than prompting to create a new repository. Type
. as the selection to create a new repository with the current project.
SPC g m calls
magit-dispatch which opens a transient menu with all the Magit commands found in Magit Status buffer. Git commands can be run without the need of the Magit status buffer.
Magit Status Fullscreenλ︎
Magit status in fullscreen mode provides lots of space to work with changes, look at logs and compare diffs.
|q||returns to previous window layout, keeping the Magit status buffer available.|
|Space u q||kills the magit status buffer and returns to previous layout|
Magit fullscreen configured in Enhanced Clojure experience
Magit fullscreen is already configured if you followed the Enhance Clojure experience.
Configure fullscreen for Magit Statusλ︎
git-magit-status-fullscreen t variable to the
git layer in
.spacemacs to enable Magit fullscreen.
Space f e d opens the Spacemacs configuration file
/ and start typing
configuration-layers to search for the
dotspacemacs-configuration-layers section. Enter confirms the search text and n jumps to the next occurrence, N jumps to the previous occurrence.
Reload the configuration or Restart Spacemacsλ︎
For the changes to take effect, either reload the
~/.spacemacs configuration using
Space f e R to reload the Spacemacs configuration or Space q r to restart Spacemacs.