Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>Git ListNew to Visual Studio Code? Get it now.
Git List

Git List

liuyuanfan

|
8 installs
| (2) | Free
Sidebar: commits, file history, branches, remotes, stashes — browse files and open diffs; paging, refresh, fetch, stash and branch actions.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Git List

A VS Code activity bar view for Git repositories in your workspace. Inspect commits, file history for the active editor file, local branches, remotes (remote-tracking branches), and stashes in the sidebar. Expand an entry to see changed files; click a file to open a diff in the built-in editor (preview tab by default). In normal file editors, the active line can show an inline hint after the line: a git name-rev-style ref label for the blame commit (not the checked-out branch), git blame author, and last-change time. Turn it off with git-list.showCursorLineGitHint. Spacing: git-list.cursorLineGitHintGapCh (default 3) widens the gap between code and the hint; git-list.cursorLineGitHintMinCodeWidthCh (default 32, 0 to disable) adds space after short lines so the hint does not hug the left margin (without shifting your source). Color: by default the hint uses a lighter theme token (input.placeholderForeground); set git-list.cursorLineGitHintColor to any CSS color to override. Hover the line to see short and full commit hash, the full commit message, and a link “Preview this file’s diff in this commit” (opens the same kind of vscode.diff as the sidebar, in preview). You can preload blame for the first N lines per file (git-list.cursorLineGitHintPreloadMaxLines, default 400) so moving the caret inside that range stays fast; set 0 to disable preloading and blame only the current line on demand. Optional per-author colors for commit icons are remembered until you clear them. In Source Control (Ctrl+Shift+G), Git List adds Stash All (include untracked)… as inline actions on “Staged Changes” / 暂存的更改 and “Changes” / 更改 (index and workingTree), using an archive codicon (less like the built-in + / check staging icons): it runs git stash push -u with an optional ‑m in the input box. Use the Command Palette for the same command. This does not replace the built-in Stash control.

Author note: The capabilities here are ones I use regularly in my day-to-day work. If you need extra features or changes, email 949257333@qq.com.

Extension icon

Features

Area What you get
Commits Paginated history from HEAD, expandable file list, open diff per file. Section-level refresh. Inline second control (next to refresh): More commit list actions… → Filter by author… — whitelist checked authors only; unchecked authors never appear until you include them again. All authors checked removes the filter. After OK, this list resets to page one and only authors already seen while loading this list appear in the picker (expand Commits once first if the picker is empty). With a filter on, each page still aims for git-list.commitsPageSize matching commits by scanning more raw history when needed (bounded by a safety cap in enormous repos; use Load more if a page is short). Context menu: Copy short hash / Copy full hash on any commit row.
File History Collapsible section (title is fixed English File History / File History (name)) listing commits for a pinned source file (last focused file:// file in a repo). Switching to a diff or other non-file editor does not change the list—only focusing another source file, rename of that file, save of that file, or refresh updates it. Uses git log --all --follow (same paging as Commits via git-list.commitsPageSize). ⋯ on the section row opens the same More commit list actions… / Filter by author… whitelist as Commits, scoped only to File History (independent from Commits or a branch’s list). Expand commits to browse files / open diffs like Commits. Commit rows share the same copy hash context actions.
Branches Paginated local branches (git branch), each branch shows paginated git log for that ref. Copy hash works on commit rows under a branch. The branch row’s ⋯ (next to refresh for that branch’s commits) opens More commit list actions… → Filter by author… with a per-branch whitelist (separate from Commits / File History). Branches not merged into current HEAD use a red branch icon (from git for-each-ref … --no-merged HEAD); the label is the plain branch name. Context: switch to branch (git switch), merge into current branch when unmerged (git merge), delete local branch (git branch -d). The Branches section row’s ⋯ (right of Refresh branch list) opens show repository status (git status in Output → Git List), abort merge / abort rebase (with confirmation when MERGE_HEAD / REBASE_HEAD exists), and bulk-delete locals whose tip is older than 6 months (with progress).
Remotes Paginated remote names (git remote). Each remote row shows (N) after the name — number of refs/remotes/<name>/… tracking branches (same scope as the list when expanded). Local branch rows show the tip date on the right instead. Each remote lists remote-tracking branches (refs/remotes/…). Same log/diff behavior as Branches; each branch row’s ⋯ includes Filter by author… for that ref’s commit list. Commit rows support copy hash as well. Unmerged-into-HEAD styling and merge when applicable. Context: switch — tries git switch <name>, then git switch -c <name> <remote/ref> if no local branch exists. Refresh runs git fetch --all --prune (section) or git fetch <remote> --prune (per remote), then reloads the list. Section title is plain English (Remotes).
Stash Paginated stash list, expandable file list, open diffs (including added-only paths with an empty “before” side, and blobs read from stash^3:path when the path exists only on the untracked parent). Context: Apply / Drop, and Copy short hash / Copy full hash on the stash row (tip commit). The file list merges git diff --name-status stash^1 stash with paths from git ls-tree stash^3 when stash -u created a third parent—so untracked snapshots appear in the tree. git stash without -u does not record untracked new files; they cannot appear in the list.
Source Control Stash All (include untracked)… as inline controls on index (暂存的更改) and workingTree (更改), with an archive icon so it reads differently from Git’s usual staging icons. Runs git stash push -u with optional -m. Same workspace root as Git List (first folder).
Global Refresh button on the view title. Optional auto-refresh when the built-in Git extension reports repo or state changes (workspace-scoped).
Editor After the caret line in tracked workspace files, optional text: name-rev ref · author · time from git blame plus git name-rev (debounced; can be disabled in settings). Hover shows short/full hash, full message, and a command link to preview the file diff for that commit. Optional preload of blame for the first N lines (one git blame range per file) to speed up caret moves; lines beyond N are still blamed on demand.
Diff from Git List When you open a commit/stash file diff from Git List, it opens as a preview editor. Stash paths marked added compare an empty document against the file at the stash commit. The diff editor’s title bar can show Open working tree file — opens the current checkout copy of that path on disk (beside the diff) so you can compare with the revision side by side.
Author icons Command Git List: Clear Saved Author Icon Colors resets stored colors for commit avatars.

Commands

Commands are also available from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) unless noted.

Command Description Typical access
Refresh Reload the whole Git List tree. View title bar
Refresh commits list Reset commits paging and refresh Commits. Commits section row (inline)
Refresh file history Reset paging and reload File History for the active file. File History section row (inline)
More commit list actions… Quick Pick with Filter by author… (author whitelist for Commits, File History, or the focused branch commit list). Commits / File History section row, or local / remote-tracking branch row (second inline control); Command Palette
Open working tree file From a Git List file diff tab, opens the same relative path in the working tree (current branch checkout on disk). Diff editor title bar (when the diff is from Git List)
Open workspace file Opens the on-disk file for a patch file row under a commit or stash (inline file icon on the right). Patch file row under a commit/stash (inline)
Stash All (include untracked)… Prompts for an optional stash message, then runs git stash push -u (with -m if non-empty). Refreshes Git List → Stash; may invoke git.refresh. Staged Changes and Changes group headers (inline archive icon); Command Palette
Refresh stash list Reset stash paging and refresh Stash. Stash section row (inline)
Refresh branch list Reset local branch paging and refresh Branches. Branches section row (inline, left)
More branch actions… Opens a Quick Pick on the Branches section row (ellipsis ⋯ icon): repository status, abort merge/rebase, and bulk-delete old locals (see Branches row above). Branches section row (inline, right of refresh); Command Palette
Git List: Show Repository Status Runs git status, prints it to Output → Git List, and notes merge/rebase-in-progress when detected. Quick Pick from More branch actions…; Command Palette
Git List: Abort Merge git merge --abort after confirmation (only if a merge is in progress). Quick Pick from More branch actions…; Command Palette
Git List: Abort Rebase git rebase --abort after confirmation (only if a rebase is in progress). Quick Pick from More branch actions…; Command Palette
Delete local branches older than 6 months… Deletes local branches whose tip committer date is older than 6 months (git branch -d each); never deletes the checked-out branch; unmerged branches are left and summarized. Progress in a notification while running. Quick Pick from More branch actions…; Command Palette
Refresh commits under this branch Reset commit paging for that branch only. Local or remote-tracking branch row (inline)
Fetch all remotes and refresh list Runs git fetch --all --prune, then resets paging and refreshes Remotes. Remotes section row (inline)
Fetch this remote and refresh branches Runs git fetch <remote> --prune, then resets branch paging under that remote. Remote row (e.g. origin, inline)
Git List: Clear Saved Author Icon Colors Clear persisted author icon colors. Command Palette
Copy short hash Copies the short commit id (or the first seven hex digits of the stash tip) to the clipboard. Commit or Stash row (context); Command Palette
Copy full hash Copies the full 40-character object id (commitMeta.fullHash or stash tip from git log). Commit or Stash row (context); Command Palette
Git List: Open commit file diff (from cursor line hint) Opens a preview vscode.diff for the current file at the blame commit (same idea as a patch file from the tree). Meant to be used from the hover link on the cursor-line hint; the palette entry exists for discoverability. Command Palette; cursor-line hover link
Create Branch from Commit… Create and check out a new branch at the selected commit. Commit row (context)
Apply Stash git stash apply for the selected entry. Stash row (context)
Drop Stash… git stash drop after confirmation. Stash row (context)
Switch to This Branch Local: git switch <branch>. Remote-tracking: git switch <shortname> or create from ref with git switch -c <shortname> <ref>. Branch row under Branches or Remotes (context)
Merge into Current Branch… Confirms then runs git merge <ref> for branches marked not fully merged (red branch icon; local or remote-tracking). Failures show summary plus Git output in the notification and the same text in Output → Git List (button to open the log). Not offered on detached HEAD. Unmerged branch row (context); Command Palette
Delete Branch… git branch -d for a local branch only (remote-tracking rows show a hint to use the server or local list). Local branch row (context)

Load more rows appear when a list has more items than the current page size; each section uses the relevant setting below.

Configuration

All settings are under Git List in VS Code Settings. Page-size options use range 1–500; the preload cap uses 0–20000.

Setting Default Description
git-list.commitsPageSize 40 Target number of commit rows per page when Commits or File History is expanded, each Load more, and under a branch. Unfiltered: Git returns about this many commits per step. Author filter on: the extension keeps reading history until it has about this many commits by included authors (or the repo / safety limit is reached), so pages stay full when possible.
git-list.stashPageSize 40 Stashes loaded when Stash is expanded and for each Load more.
git-list.branchesPageSize 40 Local branches when Branches is expanded; remote-tracking branches under each remote; Load more step in both places.
git-list.remotesPageSize 10 Remote names when Remotes is expanded and for each Load more in that list only (not the branch list under a remote).
git-list.showCursorLineGitHint true When enabled, append the git name-rev ref label, blame author, and author time after the active line. Hover for hashes, full message, and preview diff link.
git-list.cursorLineGitHintGapCh 3 Extra space (ch) between the line text and the hint (0–48).
git-list.cursorLineGitHintMinCodeWidthCh 32 If the line is shorter than this (ch, tabs expanded), add space after the line text before the hint so it sits farther right (does not indent source). 0 disables (0–256).
git-list.cursorLineGitHintColor (empty) CSS color for the hint text; empty = lighter built-in theme color.
git-list.cursorLineGitHintPreloadMaxLines 400 Preload git blame for the first N lines of each file (N = min(line count, this value)). 0 disables preloading (only the active line is blamed when needed). Max 20000.

Requirements

Requirement Notes
Git Must be on your PATH so the extension can run git.
VS Code 1.74 or newer (engines.vscode in package.json; onStartupFinished activates editor hints without opening the sidebar first).
Built-in Git Recommended: enables smoother auto-refresh when repositories open, close, or change.

Usage

  1. Open a folder or multi-root workspace that contains a Git repository.
  2. (Optional) Open a source file: with git-list.showCursorLineGitHint on (default), moving the caret updates the name-rev ref · author · time hint. Tune git-list.cursorLineGitHintGapCh, git-list.cursorLineGitHintMinCodeWidthCh, and git-list.cursorLineGitHintColor if spacing, short-line alignment, or contrast matters. Hover to see commit hashes, the full message, and preview this file’s diff in that commit. When git-list.cursorLineGitHintPreloadMaxLines is not 0 (default 400), blame for the first N lines is prefetched so jumping within that range is quicker; editing the file clears the cached blame for that path. Git does not record which branch you had checked out when you created a commit; the inline ref comes from git name-rev and is a readable ancestor relationship, not a guarantee of the “authoring” branch.
  3. Click Git List in the Activity Bar.
  4. Expand Commits, File History, Branches, Remotes, or Stash.
  5. In Source Control, use the archive-style inline button on Staged Changes / 暂存的更改 or Changes / 更改 for Stash All (include untracked)…, or run it from the Command Palette.
  6. Open a tracked source file, then expand File History to see commits for that path; focusing another source file changes the pinned file—opening a diff alone does not. Expand a commit or stash to see files; click a file to open a diff. Use Load more when it appears. Right-click a commit (any list: Commits, File History, under a branch, etc.) or a stash row to copy short or full hash.
  7. Under Branches or under a remote, expand a branch to page through its commits the same way.
  8. On the Branches section row, click ⋯ (right of refresh) for repository status, abort merge/rebase, or bulk-delete locals whose tip is older than six months.
  9. Right-click a branch row to switch, merge (if it is not fully merged into HEAD — red branch icon), or delete (local only).
  10. Filter commits by author: On Commits, File History, or a branch row, use the second inline control (More commit list actions…), then Filter by author…. Check only the authors you want — the tree shows only their commits. Check every author in the list to clear the filter. After confirming, the list reloads from page one. Authors in the dialog are limited to names already encountered while that list was loading; load more commits first if someone is missing. The Branches section’s ⋯ menu is for status / abort / bulk-delete, not this filter — use ⋯ on the branch row for the commit-list filter.

Stash and untracked files

To include new, untracked files in a stash, use git stash push -u (or --include-untracked), or use Stash All (include untracked)… in Source Control (Git List). A plain git stash only stashes changes Git already tracks; untracked paths are not stored and cannot be listed under Stash. After stash -u, Git List merges paths from stash^3 (untracked snapshot) with diff stash^1 stash so all stashed paths show in the tree.

Status bar branch and “!”

If the built-in Git extension shows a warning next to the current branch in the status bar, the repo often has dirty state, conflicts, or an unfinished merge/rebase/cherry-pick. Run Git List: Show Repository Status (or Branches → ⋯ → Show repository status) to see git status in Output → Git List; use abort merge or abort rebase from the same menu only when you intend to cancel that operation.

Git errors and the Git List output channel

When a Git List action fails (merge, checkout, branch delete, stash, fetch, etc.), the notification includes summary and Git output; the same text is appended to Output → Git List, and you can open that panel from the notification when offered.

Sponsor

If this extension is useful to you, you can support further development using the QR codes below (images from the Gitee main branch).

WeChat Alipay
WeChat QR Alipay QR

Development

npm install
npm run compile

Press F5 to launch the Extension Development Host. After changing media/icon.svg, run npm run render-icon.

Publishing

See the official guide: Publishing Extensions. Package locally with npm run package (produces git-list-<version>.vsix). Use plain English displayName and description in package.json for the Marketplace listing.

License

MIT — see LICENSE.

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