1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 22:40:04 +08:00
SpaceVim/docs/layers/git.md

58 lines
1.3 KiB
Markdown
Raw Normal View History

2017-09-28 23:31:50 +08:00
---
title: "SpaceVim git layer"
2017-12-02 23:23:58 +08:00
description: "This layers adds extensive support for git"
2017-09-28 23:31:50 +08:00
---
2018-06-23 14:37:41 +08:00
# [Available Layers](../) >> git
2017-09-28 23:31:50 +08:00
<!-- vim-markdown-toc GFM -->
- [Description](#description)
- [Install](#install)
- [Layer options](#layer-options)
2017-09-28 23:31:50 +08:00
- [Key bindings](#key-bindings)
<!-- vim-markdown-toc -->
## Description
2021-01-02 18:00:51 +08:00
This layers adds extensive support for [git](https://git-scm.com/).
2017-09-28 23:31:50 +08:00
## Install
To use this configuration layer, add following snippet to your custom configuration file (`SPC f v d`).
2017-09-28 23:31:50 +08:00
```toml
[[layers]]
name = "git"
```
2017-09-28 23:31:50 +08:00
## Layer options
2021-04-11 14:13:57 +08:00
- `git_plugin`: default value is `git`, available values include: `gina`, `fugitive`, `gita`, `git`.
if you want to use `fugitive` instead:
```toml
[[layers]]
name = "git"
git_plugin = 'fugitive'
```
2017-09-28 23:31:50 +08:00
## Key bindings
| Key Binding | Description |
| ----------- | ---------------------- |
| `SPC g s` | view git status |
| `SPC g S` | stage current file |
| `SPC g U` | unstage current file |
| `SPC g c` | edit git commit |
| `SPC g p` | git push |
2020-05-25 23:42:26 +08:00
| `SPC g m` | git branch manager |
| `SPC g d` | view git diff |
| `SPC g A` | stage all files |
| `SPC g b` | open git blame windows |
| `SPC g h a` | stage current hunk |
| `SPC g h r` | undo cursor hunk |
| `SPC g h v` | preview cursor hunk |