|
| 1 | +*git.txt* Git Plugin for Vim *Git* *git* |
| 2 | + |
| 3 | +This plugin provides commands for calling Git functions from Vim as well as |
| 4 | +syntax highlighting for various Git files. |
| 5 | + |
| 6 | +1. Commands |git-commands| |
| 7 | +2. Key mappingss |git-keymaps| |
| 8 | + |
| 9 | +============================================================================== |
| 10 | +1. Commands *git-commands* |
| 11 | + |
| 12 | +If a command has an [args] argument, it is passed to appropriate git command. |
| 13 | + |
| 14 | + *git-command* |
| 15 | +:Git [args] Run git [args] in shell and display output. |
| 16 | + |
| 17 | + *git-add* |
| 18 | +:GitAdd [afile] Stage changes in [afile] or current file |
| 19 | + if [afile] is not specified. |
| 20 | + |
| 21 | + *git-blame* |
| 22 | +:GitBlame Show what revision and author last modified |
| 23 | + each line of current file. |
| 24 | + |
| 25 | + *git-checkout* |
| 26 | +:GitCheckout [args] Checkout a branch or paths to the working |
| 27 | + tree. |
| 28 | + |
| 29 | + *git-commit* |
| 30 | +:GitCommit [args] Record changes to the repository. If no files |
| 31 | + were added to index (either using *:GitAdd* or |
| 32 | + any other tool) it commits everything like > |
| 33 | + git-commit -a |
| 34 | +< |
| 35 | + |
| 36 | + *git-diff* |
| 37 | +:GitDiff [args] Show changes between commits and working tree. |
| 38 | + |
| 39 | + *git-log* |
| 40 | +:GitLog [args] Show commit logs of current file. |
| 41 | + |
| 42 | + *git-pull* |
| 43 | +:GitPull [args] Fetch from and merge with another repository |
| 44 | + or local branch. |
| 45 | + |
| 46 | + *git-pull-rebase* |
| 47 | +:GitPullRebase Same as |:GitPull| with --rebase argument. |
| 48 | + |
| 49 | + *git-push* |
| 50 | +:GitPush [args] Update remote refs along with associated |
| 51 | + objects. Unless specified in [args], it will |
| 52 | + push to origin/<CURRENT_BRANCH>. |
| 53 | + |
| 54 | + *git-status* |
| 55 | +:GitStatus Show working tree status. You can use keymaps |
| 56 | + in the newly opened buffer to manipulate files. |
| 57 | + |
| 58 | + <Enter> will stage file under cursor |
| 59 | + - will remove file from index |
| 60 | + |
| 61 | + *git-vimdiff-merge* |
| 62 | +:GitVimDiffMerge [args] Show vimdiff for merge. |
| 63 | + |
| 64 | + *git-vimdiff-merge-done* |
| 65 | +:GitVimDiffMergeDone Mark conflicts as resolved and quit diff mode. |
| 66 | + |
| 67 | +============================================================================== |
| 68 | +2. Key mappings *git-keymaps* |
| 69 | + |
| 70 | +All mappings use <Leader> to avoid conflicts with default commands. See |
| 71 | +*mapleader* for details. |
| 72 | + |
| 73 | +<Leader>gd :GitDiff |
| 74 | +<Leader>gD :GitDiff --cached |
| 75 | +<Leader>gs :GitStatus |
| 76 | +<Leader>gl :GitLog |
| 77 | +<Leader>ga :GitAdd |
| 78 | +<Leader>gA :GitAdd |
| 79 | +<Leader>gc :GitCommit |
| 80 | +<Leader>gp :GitPullRebase |
| 81 | + |
| 82 | +============================================================================== |
| 83 | + vim:tw=78:ts=8:ft=help:norl:noexpandtab |
0 commit comments