hwwGitLog
English | 简体中文
hwwGitLog is a lightweight VS Code extension for current-line blame, recent commit
history, searchable repository history, changed-file trees, and on-demand file diffs.
The UI language defaults to Chinese. Set hwwGitLog.language to en for English
menus and runtime content.
Features
- Current-line blame at the end of the editor line and in the status bar.
- Timeline-style selected-code history from the editor context menu using
git log -L.
- Current-file history from the editor context menu when no text is selected.
- Repository-wide Git Log page with search, pagination, changed-file tree, and colored diff.
- Search by author, commit message, commit hash, file path, code string
-S, and regex -G.
- Lazy commit expansion, changed-file lists, and colored inline patches.
- Commit details opened from blame or the commits tree.
- The latest 100 commits in a dedicated Activity Bar view.
- Changed files loaded only when a commit is opened or expanded.
- Folder-tree path compaction that preserves each root-level folder.
- File patches loaded only when selected.
- Git commands executed with
child_process.spawn and shell: false.
- Windows-safe repository-relative Git paths.
- Git timing and error diagnostics in the
hwwGitLog output channel.
Development
conda env create -f environment.yml
conda activate hwwgitlog-dev
npm install
npm run compile
npm test
Press F5 in VS Code to start an Extension Development Host.
Package And Install Locally
Build a local VSIX package:
npm run vsix
The command generates a file like hwwgitlog-0.7.0.vsix in the project root.
Install it in VS Code:
code --install-extension hwwgitlog-0.7.0.vsix
You can also open VS Code, go to Extensions, choose Install from VSIX..., and
select the generated file.
Publish To VS Code Marketplace
The Marketplace publisher ID is huangww.
Log in to the publisher account:
npx vsce login huangww
Publish the current version:
npm test
npm run vsix
npx vsce publish
For a patch release, update the version first:
npx vsce publish patch
References And Acknowledgements
hwwGitLog is not a fork of the projects below, and its implementation is written
for this repository. The project was built while studying the product ideas,
interaction patterns, and Git workflows of these open-source projects:
- GitLens: line blame, commit details, and Git history experience in VS Code.
- Git Graph: commit list, graph-oriented history UI, and commit/file interaction ideas.
- Git History: file history and repository history workflows for VS Code.
- Git Blame: lightweight status-bar blame interaction.
- VS Code built-in Git extension: VS Code Git integration and extension API patterns.
- Git Extensions: mature Git log, file history, and diff layout ideas.
- lazygit and gitui: fast Git UI interaction and command execution ideas.
Detailed setup, architecture, progress, and continuation notes are maintained in
docs/DEVELOPMENT_PROGRESS.md. The latest detailed
implementation note is docs/2026-06-16-v0.7.0-progress.md.
Current Scope
Version 0.7.0 includes the Activity Bar commit tree, current-line blame, commit
details, selected-code history, current-file history, repository-wide Git Log page,
search, lazy changed-file loading, and colored file patches.
The repository Git Log page is table-based: time, message, author, changed-file
count, and copyable commit hash are shown in one list. Clicking a row expands a
collapsed folder tree for that commit, and clicking a file opens its diff in a
closable overlay.
The Git Log page also supports a tree-style file path picker for search. Right-click
a commit in the list or the Activity Bar tree to view details, copy the hash, revert,
apply inverse changes without committing, cherry-pick, apply commit changes without
committing, create a branch from the commit, checkout the commit in detached HEAD,
or reset the current branch to that commit. File nodes in the Activity Bar tree can
restore a file to the selected commit version.
Operations that can modify the repository show a confirmation dialog and require a
clean working tree first.
The repository Git Log author field suggests authors from already loaded commits.
Current-line blame is optimized with faster debounce, request de-duplication, and
repository path caching.
The following planned features are intentionally deferred:
- A commit graph and merge arrows.
- Visible-range multi-line blame.
- Multi-repository picker.
The Chinese maintenance guide records the current state and the recommended steps
for continuing development later.