sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.85k stars 105 forks source link

View only staged (git diff --staged) #295

Closed joshmedeski closed 1 year ago

joshmedeski commented 1 year ago

I'd like to view only the hunks I currently have staged. While generating a commit message I want to make this view visible so I can review what's about to be committed.

This is achieved by running git diff --staged.

What's the best way to do this? I've looked through the docs and issues and can't figure out a good solution.

sindrets commented 1 year ago

:h :DiffviewOpen

The option is there

:DiffviewOpen --staged