2021-01-02 18:15:08 +08:00
|
|
|
# git.vim
|
|
|
|
|
2024-07-26 19:29:48 +08:00
|
|
|
> _git.vim_ is a plugin to use _git_ command in vim and neovim.
|
2021-01-02 18:15:08 +08:00
|
|
|
|
2024-07-26 19:29:48 +08:00
|
|
|
[![](https://spacevim.org/img/build-with-SpaceVim.svg)](https://spacevim.org)
|
|
|
|
[![GPLv3 License](https://img.spacevim.org/license-GPLv3-blue.svg)](LICENSE)
|
2021-01-02 18:15:08 +08:00
|
|
|
|
|
|
|
<!-- vim-markdown-toc GFM -->
|
|
|
|
|
2024-07-26 19:29:48 +08:00
|
|
|
- [Install](#install)
|
|
|
|
- [Usage](#usage)
|
2021-01-02 18:15:08 +08:00
|
|
|
- [Screenshot](#screenshot)
|
|
|
|
- [Feedback](#feedback)
|
|
|
|
|
|
|
|
<!-- vim-markdown-toc -->
|
|
|
|
|
2024-07-26 19:29:48 +08:00
|
|
|
## Install
|
|
|
|
|
|
|
|
1. Using `git.vim` in SpaceVim:
|
|
|
|
|
|
|
|
```toml
|
|
|
|
[[layers]]
|
|
|
|
name = 'git'
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Using `git.vim` without SpaceVim:
|
|
|
|
|
|
|
|
```
|
|
|
|
Plug 'wsdjeg/git.vim'
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
2021-01-02 18:15:08 +08:00
|
|
|
|
|
|
|
- `:Git add %`: stage current file.
|
|
|
|
- `:Git add .`: stage all files
|
|
|
|
- `:Git commit`: edit commit message
|
|
|
|
- `:Git push`: push to remote
|
|
|
|
- `:Git fetch`: fetch remotes
|
|
|
|
- `:Git checkout`: checkout branches
|
|
|
|
- `:Git log %`: view git log of current file
|
|
|
|
- `:Git config`: list all git config
|
|
|
|
- `:Git reflog`: manage reflog information
|
|
|
|
- `:Git branch`: list, create, or delete branches
|
|
|
|
|
|
|
|
## Screenshot
|
|
|
|
|
|
|
|
**`:Git status`**
|
|
|
|
|
2023-07-05 11:50:23 +08:00
|
|
|
![git-status](https://img.spacevim.org/70063320-85efb600-1622-11ea-9aad-88d8b5b0f6d6.png)
|
2021-01-02 18:15:08 +08:00
|
|
|
|
|
|
|
**`:Git commit`**
|
|
|
|
|
2023-07-05 11:50:23 +08:00
|
|
|
![git-commit](https://img.spacevim.org/70335089-96519c00-1881-11ea-9c96-84c32566a002.png)
|
2021-01-02 18:15:08 +08:00
|
|
|
|
|
|
|
**`:Git push`**
|
|
|
|
|
2023-07-05 11:50:23 +08:00
|
|
|
![git-push](https://img.spacevim.org/70335203-d0bb3900-1881-11ea-8bf3-85b248c20dae.png)
|
2021-01-02 18:15:08 +08:00
|
|
|
|
|
|
|
**`:Git push`** completion
|
|
|
|
|
2023-07-05 11:50:23 +08:00
|
|
|
![git-push-complete](https://img.spacevim.org/70384670-7de69c00-19bd-11ea-91fe-9e8ced9775db.gif)
|
2021-01-02 18:15:08 +08:00
|
|
|
|
|
|
|
**`:Git diff`**
|
|
|
|
|
2023-07-05 11:50:23 +08:00
|
|
|
![git-diff](https://img.spacevim.org/70369625-7c52a080-18f7-11ea-9ee9-a1ba499b3d1f.png)
|
2021-01-02 18:15:08 +08:00
|
|
|
|
|
|
|
**`:Git log`**
|
|
|
|
|
2023-07-05 11:50:23 +08:00
|
|
|
![git-log](https://img.spacevim.org/70444048-39015900-1ad4-11ea-9522-1711c0c67098.png)
|
2021-01-02 18:15:08 +08:00
|
|
|
|
|
|
|
## Feedback
|
|
|
|
|
2023-04-29 22:29:21 +08:00
|
|
|
The development of this plugin is in [`SpaceVim/bundle/git.vim`](https://github.com/SpaceVim/SpaceVim/tree/master/bundle/git.vim) directory.
|
2024-07-28 18:28:56 +08:00
|
|
|
|
|
|
|
If you encounter any bugs or have suggestions, please file an issue in the [issue tracker](https://github.com/SpaceVim/SpaceVim/issues)
|