'How to stage all modified and new files with vim-fugitive
I know that you can use GWrite to stage current file. You can also use GStatus and - to stage the file you are selecting.
Is there a way to GWrite all the files or do git add . without using GStatus ?
Solution 1:[1]
See :h :Git, which can
Run an arbitrary git command. Similar to :!git [args] but chdir to the repository tree first.
:Git add .
Solution 2:[2]
Not the answer to your specific question but something I've learned from one of the screencasts specified in github/tpope/vim-fugitive/README.markdown is you can do a visual select all file lines, - to stage them all, then cc to commit, all from within the Gstatus screen.
Solution 3:[3]
I think you can just add a number before -. E.g. 5- to stage/unstage 5 of them.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | leaf |
| Solution 2 | kabanek |
| Solution 3 | nemo |
