Skip to content

[Feature Request] IntelliJ-style git gutter patch preview/operations (git checkout -p) #10782

Closed
@jabooth

Description

@jabooth

IntelliJ has a very natural UI for managing individual git patches - click in the gutter at a change indicator, and you immediately have the previous version of the file displayed and options for that diff (by far the most useful of which is rollback)

intellij_git_gutter

Use case

You open back up your editor and look at the file you were working on last night. You see in the sidebar little symbols indicating additions removals and changes (handy!). You can't remember what this particular change was though.

IntelliJ solution

Click the gutter symbol, see the old version of these few lines immediately in context. Ohh yeah that was just something you were fooling around with for debugging but it's not needed any more, click to rollback this single change.

VSCode solution

Change entirely to another view in the editor to see a full file-by-file diff of the two files (Git: Open Change). Unless I'm mistaken, manually change the file to undo the change (I looked for Git: {Revert,Undo,Rollback} this {change,diff,patch}) but came up empty).

Big picture

VSCode's inbuilt git UI is great for rolling back changes at the file level (git checkout), but weak at changes at the patch level (git checkout -p). This IntelliJ paradigm is the best GUI I have seen for handling this common operation.

I would love to contribute this feature to VSCode, whether though an extension or an addition to the core product. I would personally lobby for an inclusion in the core, as it complements and completes in my mind the existing git checkout/add features that do not require extensions. I also believe it is not presently possible to customise the gutter in extensions (#9561).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions