mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-04-25 00:34:00 +08:00
Compare commits
89 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 16c2b7abb9 | |||
| 1e3f1103d9 | |||
| 9835920a3c | |||
| fd36aa9c61 | |||
| 4dd41688cf | |||
| 18d6d1ab82 | |||
| 9ce67cdc93 | |||
| bf04261080 | |||
| 52d180af0a | |||
| 14daf094d9 | |||
| ac904e806d | |||
| 9f768cd3bc | |||
| 09cdce7add | |||
| 8851b8fe64 | |||
| cfa485ede7 | |||
| 207c643ea4 | |||
| cac2c8ef8e | |||
| a9a22e0e4e | |||
| c3e918072f | |||
| d854197c03 | |||
| d8ce8d1d03 | |||
| 23faeadc7c | |||
| 1ecd12d523 | |||
| f8aa87a4b5 | |||
| dba8a0705d | |||
| 8cf3d94a3a | |||
| 28de2a1ddd | |||
| 01cda4d443 | |||
| b5188a1b4f | |||
| 8e63140181 | |||
| cec56ef5ff | |||
| 1e755064e9 | |||
| 0b43b51d77 | |||
| 5dcf8a0175 | |||
| 2509641eac | |||
| 073f3a37b9 | |||
| b7b23001de | |||
| b319b69453 | |||
| 03cc95cc19 | |||
| 7c4a906147 | |||
| b5b2548a87 | |||
| ca727b07f1 | |||
| 0fbbe0b3a4 | |||
| 1c844375fa | |||
| e065e4f841 | |||
| 21b6dd7aee | |||
| 935a2cccd3 | |||
| c2908b174d | |||
| b0e38f08dc | |||
| 4cc201cbe3 | |||
| baa05dcfda | |||
| 0095769029 | |||
| e8b94098bb | |||
| eb8eb1850a | |||
| 933f6a1e1d | |||
| 34719016ec | |||
| 2c8461db08 | |||
| d3b98d9886 | |||
| 5699f4613c | |||
| 0374322ba5 | |||
| 90ee6fb5d2 | |||
| 04fe4bfcd9 | |||
| 7423d72b51 | |||
| 24d4098ceb | |||
| 5aaa65736d | |||
| 5d1c219ee5 | |||
| a739112bfc | |||
| d376506177 | |||
| 9af975c82c | |||
| 11f89ba749 | |||
| 45e5317200 | |||
| ee2b0ecdb8 | |||
| 94a5d6fe2f | |||
| 0cd33c6170 | |||
| 6239f5ed8e | |||
| 188692556a | |||
| 716f3d2d4e | |||
| 8576741d61 | |||
| 32957cb552 | |||
| fdc8569c18 | |||
| 7fb703534a | |||
| 41cdbdcd62 | |||
| 91900baad1 | |||
| fb5661211d | |||
| 276f89837f | |||
| 4581cd4217 | |||
| df103dc595 | |||
| 989fb15b8c | |||
| 123d2e096d |
+6
-8
@@ -11,8 +11,8 @@ Vim's diff handling capabilities to stage a subset of the file's
|
|||||||
changes.
|
changes.
|
||||||
|
|
||||||
Bring up the output of `git status` with `:Gstatus`. Press `-` to
|
Bring up the output of `git status` with `:Gstatus`. Press `-` to
|
||||||
`add`/`reset` a file's changes, or `p` to `add`/`reset` `--patch` that
|
`add`/`reset` a file's changes, or `p` to `add`/`reset` `--patch`. And guess
|
||||||
mofo. And guess what `:Gcommit` does!
|
what `:Gcommit` does!
|
||||||
|
|
||||||
`:Gblame` brings up an interactive vertical split with `git blame`
|
`:Gblame` brings up an interactive vertical split with `git blame`
|
||||||
output. Press enter on a line to edit the commit where the line
|
output. Press enter on a line to edit the commit where the line
|
||||||
@@ -55,15 +55,13 @@ and `Git!` to open the output of a command in a temp file.
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
If you don't have a preferred installation method, I recommend
|
If you don't have a preferred installation method, one option is to install
|
||||||
installing [pathogen.vim](https://github.com/tpope/vim-pathogen), and
|
[pathogen.vim](https://github.com/tpope/vim-pathogen), and then copy
|
||||||
then simply copy and paste:
|
and paste:
|
||||||
|
|
||||||
cd ~/.vim/bundle
|
cd ~/.vim/bundle
|
||||||
git clone git://github.com/tpope/vim-fugitive.git
|
git clone git://github.com/tpope/vim-fugitive.git
|
||||||
|
vim -u NONE -c "helptags vim-fugitive/doc" -c q
|
||||||
Once help tags have been generated, you can view the manual with
|
|
||||||
`:help fugitive`.
|
|
||||||
|
|
||||||
If your Vim version is below 7.2, I recommend also installing
|
If your Vim version is below 7.2, I recommend also installing
|
||||||
[vim-git](https://github.com/tpope/vim-git) for syntax highlighting and
|
[vim-git](https://github.com/tpope/vim-git) for syntax highlighting and
|
||||||
|
|||||||
+57
-24
@@ -63,12 +63,32 @@ that are part of Git repositories).
|
|||||||
to commit, |:Gstatus| is called instead. Unless the
|
to commit, |:Gstatus| is called instead. Unless the
|
||||||
arguments given would skip the invocation of an editor
|
arguments given would skip the invocation of an editor
|
||||||
(e.g., -m), a split window will be used to obtain a
|
(e.g., -m), a split window will be used to obtain a
|
||||||
commit message. Write and close that window (:wq or
|
commit message, or a new tab if -v is given. Write
|
||||||
|:Gwrite|) to finish the commit. Unlike when running
|
and close that window (:wq or |:Gwrite|) to finish the
|
||||||
the actual git-commit command, it is possible (but
|
commit. Unlike when running the actual git-commit
|
||||||
unadvisable) to muck with the index with commands like
|
command, it is possible (but unadvisable) to alter the
|
||||||
git-add and git-reset while a commit message is
|
index with commands like git-add and git-reset while a
|
||||||
pending.
|
commit message is pending.
|
||||||
|
|
||||||
|
*fugitive-:Gmerge*
|
||||||
|
:Gmerge [args] Calls git-merge and loads errors and conflicted files
|
||||||
|
into the quickfix list. Opens a |:Gcommit| style
|
||||||
|
split window for the commit message if the merge
|
||||||
|
succeeds. If called during a merge conflict, the
|
||||||
|
conflicted files from the current index are loaded
|
||||||
|
into the quickfix list.
|
||||||
|
|
||||||
|
*fugitive-:Gpull*
|
||||||
|
:Gpull [args] Like |:Gmerge|, but for git-pull.
|
||||||
|
|
||||||
|
*fugitive-:Gpush*
|
||||||
|
:Gpush [args] Invoke git-push, load the results into the quickfix
|
||||||
|
list, and invoke |:cwindow| to reveal any errors.
|
||||||
|
|:Dispatch| is used if available for asynchronous
|
||||||
|
invocation.
|
||||||
|
|
||||||
|
*fugitive-:Gfetch*
|
||||||
|
:Gfetch [args] Like |:Gpush|, but for git-fetch.
|
||||||
|
|
||||||
*fugitive-:Ggrep*
|
*fugitive-:Ggrep*
|
||||||
:Ggrep [args] |:grep| with git-grep as 'grepprg'.
|
:Ggrep [args] |:grep| with git-grep as 'grepprg'.
|
||||||
@@ -84,6 +104,11 @@ that are part of Git repositories).
|
|||||||
previous commits rather than previous file revisions
|
previous commits rather than previous file revisions
|
||||||
are loaded.
|
are loaded.
|
||||||
|
|
||||||
|
:{range}Glog [args] Use git-log -L to load previous revisions of the given
|
||||||
|
range of the current file into the quickfix list. The
|
||||||
|
cursor is positioned on the first line of the first
|
||||||
|
diff hunk for each commit.
|
||||||
|
|
||||||
*fugitive-:Gllog*
|
*fugitive-:Gllog*
|
||||||
:Gllog [args] Like |:Glog|, but use the location list instead of the
|
:Gllog [args] Like |:Glog|, but use the location list instead of the
|
||||||
quickfix list.
|
quickfix list.
|
||||||
@@ -195,32 +220,40 @@ that are part of Git repositories).
|
|||||||
:[range]Gblame [flags] Run git-blame on the given range.
|
:[range]Gblame [flags] Run git-blame on the given range.
|
||||||
|
|
||||||
*fugitive-:Gbrowse*
|
*fugitive-:Gbrowse*
|
||||||
:[range]Gbrowse If the remote for the current branch is on GitHub,
|
:Gbrowse Open the current file, blob, tree, commit, or tag
|
||||||
open the current file, blob, tree, commit, or tag
|
in your browser at the upstream hosting provider.
|
||||||
(with git-web--browse) on GitHub. Otherwise, open the
|
If a range is given, it is appropriately appended to
|
||||||
current file, blob, tree, commit, or tag in
|
the URL as an anchor.
|
||||||
git-instaweb (if you have issues, verify you can run
|
|
||||||
"git instaweb" from a terminal). If a range is given,
|
|
||||||
it is appropriately appended to the URL as an anchor.
|
|
||||||
|
|
||||||
To use with GitHub FI, point g:fugitive_github_domains
|
Upstream providers can be added by installing an
|
||||||
at a list of domains:
|
appropriate Vim plugin. For example, GitHub can be
|
||||||
>
|
supported by installing rhubarb.vim, available at
|
||||||
let g:fugitive_github_domains = ['https://example.com']
|
<https://github.com/tpope/vim-rhubarb>. (Native
|
||||||
~
|
support for GitHub is currently included, but that is
|
||||||
:[range]Gbrowse! Like :Gbrowse, but put the URL on the clipboard rather
|
slated to be removed.)
|
||||||
than opening it.
|
|
||||||
|
|
||||||
:[range]Gbrowse {revision}
|
The hosting provider is determined by looking at the
|
||||||
Like :Gbrowse, but for a given |fugitive-revision|. A
|
remote for the current or specified branch and falls
|
||||||
|
back to "origin". In the special case of a "."
|
||||||
|
remote, a local instance of git-instaweb will be
|
||||||
|
started and used.
|
||||||
|
|
||||||
|
:Gbrowse {revision} Like :Gbrowse, but for a given |fugitive-revision|. A
|
||||||
useful value here is -, which ties the URL to the
|
useful value here is -, which ties the URL to the
|
||||||
latest commit rather than a volatile branch.
|
latest commit rather than a volatile branch.
|
||||||
|
|
||||||
:[range]Gbrowse [...]@{remote}
|
:Gbrowse [...]@{remote} Force using the given remote rather than the remote
|
||||||
Force using the given remote rather than the remote
|
|
||||||
for the current branch. The remote is used to
|
for the current branch. The remote is used to
|
||||||
determine which GitHub repository to link to.
|
determine which GitHub repository to link to.
|
||||||
|
|
||||||
|
:{range}Gbrowse [args] Appends an anchor to the URL that emphasizes the
|
||||||
|
selected lines. You almost certainly want to give a
|
||||||
|
"-" argument in this case to force the URL to include
|
||||||
|
an exact revision.
|
||||||
|
|
||||||
|
:[range]Gbrowse! [args] Like :Gbrowse, but put the URL on the clipboard rather
|
||||||
|
than opening it.
|
||||||
|
|
||||||
MAPPINGS *fugitive-mappings*
|
MAPPINGS *fugitive-mappings*
|
||||||
|
|
||||||
These maps are available everywhere.
|
These maps are available everywhere.
|
||||||
|
|||||||
+628
-204
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user