Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Show History for Selected CodeNew to Visual Studio Code? Get it now.
Show History for Selected Code

Show History for Selected Code

Travis Nguyen

|
1 install
| (0) | Free
IntelliJ-style Show History for Selection in VS Code: view Git history for selected lines with side-by-side parent vs revision diff.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Show History for Selection

Show History for Selection lists Git commits that touched your current selection, then opens a side-by-side diff of parent vs selected revision for the same file.

Features

  • Commit list scoped to the selected lines (per-line union + range trace)
  • Resizable Commits panel (drag the handle above the list; height is remembered)
  • Full commit message in a modal (click Commit Message) or hover preview
  • Scroll sync between Parent and Revision panes

Requirements

  • Git on your PATH
  • File saved on disk and tracked by Git

Usage

  1. Open a file in a Git repository.
  2. Select one or more lines (or place the cursor on a single line).
  3. Run Show History for Selection:
    • Command Palette (Ctrl+Shift+P / Cmd+Shift+P), or
    • Editor context menu.
  4. Pick a commit in the list to load the diff. Drag the horizontal bar above Commits to change the list height.

Contributing & issues

Use the repository linked on the Marketplace page.

License

MIT — see LICENSE.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft