Search code examples
gitvimworkflowpull-requestvim-fugitive

Vim create list of files different from master


I'm looking for a way to set up Vim so that I can create a list of all the files on the current branch that are different to master(or any other branch of choice).

I already use vim-fugitive for git diffing at file level. I would like a way to create a list of all the files that have changed so I can go through them and then use vim-fugitive to review.

This is to help when working on branches other devs have been working on and receiving pull requests. My intention is that I would fetch and checkout the branch run a command and all the files that have differences to master will go into a quickfix window (or even into my buffers). I could then go through the list of files to review.


Solution

  • I've come up with a way to do this myself.

    Using vim-fugitive and another plugin vim-merginal

    vim merginal :Merginal will display a pane with a list of branches. gd on a selected branch gives a list of files that are different. I can then go into the files using :Gdiff to view the indivdual changes.