Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>BGraph LineageNew to Visual Studio Code? Get it now.
BGraph Lineage

BGraph Lineage

yuanzhoulvpi2017

|
5 installs
| (0) | Free
Browse Git branches and history, jump from a line to the commit that last changed it, and compare file revisions.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

BGraph Lineage

简体中文 · English

简体中文

在 VS Code 里浏览 Git 提交图,查看分支在哪里合并、一次提交改了哪些文件,也可以从一行代码直接找到最后修改它的提交。查看历史和比较文件都在本地完成,离线也能用。

提交图在哪里

打开一个 Git 仓库。在默认布局中,编辑器下方的面板里有「终端」和「输出」标签。点击同一排的 Git BGraph 即可查看提交图。如果看不到这个标签,按 F1 打开命令面板,运行 Git BGraph: 打开提交图。

查看一次提交改了什么

要查 src/model.py 的改动,在「文件路径」中输入这个路径,就能看到改过它的提交。也可以按分支或作者筛选,或直接搜索提交说明和哈希。

选中一条提交,右侧会列出它改过的文件。双击文件,即可在 VS Code 里对照修改前后的代码。想连续查看几个文件,可以点击「变更文件」旁的眼睛,开启 显示差异预览,然后单击文件逐个查看。这个菜单也可以切换目录树和平铺列表。

需要和同事讨论某处改动时,右键文件,选择 复制文件链接。链接固定到当时的版本,即使分支后来有了新提交,对方看到的仍是同一份代码。支持 GitHub、GitLab、Bitbucket Cloud 和 Gitee。私有项目的访问权限由对应平台管理。

从一行代码追溯改动

  1. 把光标放在一行已提交的代码上。行尾会显示最后修改这行的人、时间和提交摘要。
  2. 将鼠标停在行尾的作者信息上,点击 在提交图中查看。提交图会选中那次提交,你可以接着看同一次改动涉及的其他文件。

在支持函数符号的语言中,还可以点击函数上方的作者姓名,查看当前函数里有多少行代码是每位作者最后修改的。这项功能需要开启 VS Code 的 CodeLens。

English

Browse your Git history in VS Code to see where branches merged and which files changed in a commit. From any committed line of code, you can jump to the commit that last changed it. History and file comparisons run locally and work offline.

Where to find the commit graph

Open a Git repository. In the default layout, the panel below the editor has tabs for Terminal and Output. Click Git BGraph in that row to see the commit graph. If you can’t see the tab, press F1 to open the Command Palette and run Git BGraph: Open Graph.

See what changed in a commit

To find changes to src/model.py, enter that path in File path. You can also filter by branch or author, or search by commit message or hash.

Select a commit to see its changed files on the right. Double-click a file to open its diff in VS Code. To review several files in succession, click the eye icon beside Changed files, turn on Show diff preview, then click each file. The same menu lets you switch between a directory tree and a flat list.

To share a file as it looked at that commit, right-click it and choose Copy file link. The link points to that revision even after the branch moves on. GitHub, GitLab, Bitbucket Cloud, and Gitee are supported. The hosting service controls access to private repositories.

Trace a line of code

  1. Place the cursor on a committed line. The annotation at the end of the line shows who last changed it, when, and the commit summary.
  2. Hover over the annotation and click View in Commit Graph. The graph selects that commit so you can inspect the other files it changed.

In languages that provide function symbols, click the author name above a function to see how many of its current lines each contributor last changed. This requires CodeLens to be enabled in VS Code.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft