VS Code Extensions
G

Git Line Authors

by RupeshBabu

Shows lines and percentage written by each contributor in the current file

Downloads

7

Rating

(0)

Version

0.1.6

Last updated

Aug 18, 2026

See who wrote what. Git Line Authors runs git blame on a file and breaks down how many lines — and what percentage of the file — each contributor actually wrote. Available as a VS Code extension and as a standalone Python script for terminal use.

Features

  • Status bar summary — shows the top contributor for the active file at a glance (⎇ Jane Doe: 64%), updated automatically when you switch files or save.
  • Author stats panel — a webview with a full breakdown per author: rank, avatar (colored initials), email, line count, and a percentage bar.
  • Per-author line contribution details — expand any author to see exactly which lines they wrote, along with the commit ID, commit message, and date. Consecutive lines from the same commit are grouped into a single range (e.g. 5–12) instead of listed individually.
  • Sort by Line, Commit, or Date — toggle between three views inside each author's section: sorted by line number, grouped by commit, or grouped by date (newest first) with line ranges listed under each date.
  • Quick notification view — a lighter popup with the same stats as plain text, with a button to open the full panel.
  • Works on any file, not just the open one — right-click a file in the Explorer sidebar, or run a command from the Palette and pick a file from a dialog.
  • Configurable — toggle the status bar item, and choose whether whitespace-only lines count toward the totals.

Usage

Action How
See top contributor at a glance Look at the status bar (bottom right) while a tracked file is open
Quick stats popup Command Palette → Git Line Authors: Show Author Stats for Current File
Full stats panel Command Palette → Git Line Authors: Open Author Stats Panel
Stats for a file you haven't opened Right-click the file in the Explorer sidebar → Git Line Authors: Open Author Stats Panel
Stats with nothing open Run either command from the Palette with no editor open — a file picker dialog appears

The panel and popup both require the file to be tracked by git with at least one commit; untracked or unsaved files show a warning instead of stats.

How it works

Stats come from git blame --porcelain <file>. Git's porcelain format only emits an author's name/email the first time their commit appears anywhere in the output — every later line from that same commit (even in a separate, non- contiguous chunk) repeats only the commit hash. The parser keeps a per-commit cache of { author, email } so every line gets attributed correctly, no matter where in the blame output its commit's metadata was first introduced.

Line Contribution Details

Clicking Open Author Stats Panel shows a summary table at the top, followed by a collapsible section for each author. Expand any author to see a detailed view of every line they contributed.

By Line (default)

Lines are grouped: consecutive lines that belong to the same commit are shown as a single range. Each row shows the line range, how many lines it covers, the short commit SHA, the commit message, and the date.

▼ Jane Doe  [email protected]                    61 lines · 4 ranges
┌──────────┬───────┬─────────┬──────────────────────────┬────────────┐
│ Lines    │ Count │ Commit  │ Message                  │ Date       │
├──────────┼───────┼─────────┼──────────────────────────┼────────────┤
│      1–5 │     5 │ a1b2c3d │ Initial parser setup     │ 2024-03-01 │
│    10–18 │     9 │ e4f5a6b │ Add porcelain format     │ 2024-03-14 │
│    30–42 │    13 │ a1b2c3d │ Initial parser setup     │ 2024-03-01 │
│    55–88 │    34 │ 9c8d7e6 │ Refactor author map      │ 2024-04-02 │
└──────────┴───────┴─────────┴──────────────────────────┴────────────┘

By Commit

Switch to By Commit to group all of an author's line ranges under the commit that introduced them. Each commit header shows the SHA, message, and date; the line ranges it covers appear as chips below.

▼ Jane Doe  [email protected]                    61 lines · 4 ranges

  a1b2c3d  Initial parser setup          2024-03-01
  L1–5 (5)   L30–42 (13)

  e4f5a6b  Add porcelain format          2024-03-14
  L10–18 (9)

  9c8d7e6  Refactor author map           2024-04-02
  L55–88 (34)

By Date

Switch to By Date to group an author's line ranges by the date they were committed, sorted newest first. Each date header shows the total lines contributed on that day, with a table of ranges and their commits beneath it.

▼ Jane Doe  [email protected]                    61 lines · 4 ranges

  2024-04-02                                        34 lines
  ┌──────────┬───────┬─────────┬──────────────────────────┐
  │ Lines    │ Count │ Commit  │ Message                  │
  │    55–88 │    34 │ 9c8d7e6 │ Refactor author map      │
  └──────────┴───────┴─────────┴──────────────────────────┘

  2024-03-14                                         9 lines
  ┌──────────┬───────┬─────────┬──────────────────────────┐
  │    10–18 │     9 │ e4f5a6b │ Add porcelain format     │
  └──────────┴───────┴─────────┴──────────────────────────┘

  2024-03-01                                        18 lines
  ┌──────────┬───────┬─────────┬──────────────────────────┐
  │      1–5 │     5 │ a1b2c3d │ Initial parser setup     │
  │    30–42 │    13 │ a1b2c3d │ Initial parser setup     │
  └──────────┴───────┴─────────┴──────────────────────────┘

Toggle between all three views with the By Line / By Commit / By Date buttons at the top of the section — the switch is instant.

License

MIT — see LICENSE.

Related extensions