gitvimvim-fugitive

Access the last git command output in fugitive


Is there any way to see the git output produced by the most recent git command using vim-fugitive?

I know that there is :Git! but this is only useful if you know that you want to see results of a command before you issue it.

What do I do if I issued, say :Gpull, then vim shown no output, and I would, just in case, like to see what was the git command output, after I have called pull? (of course doing :Git! pull does not help, as the subsequent pull will produce a different output).

Thank you for helping.


Solution

  • :Gpull will populate the quickfix window with the results of the pull. Use :copen to open the quickfix window and see the results. The quickfix window will automatically open if there are errors with the pull and/or you can use the quickfix commands to navigate the quickfix list.

    Personally I use Tim Pope's unimpaired plugin to navigate the quickfix list.

    For more information see:

    :h :Gmerge
    :h :Gpull
    :h quickfix
    :h :cope
    

    Note: :Gpull has been changed to :G pull. The same goes for merge, fetch, and push, etc.