我可以从Visual Studio Code中执行各种Git命令,但是我找不到一种方法来可视化历史。


当前回答

GitLens有一个很好的Git历史浏览器。从扩展市场安装GitLens,然后从命令面板运行“Show GitLens Explorer”。

其他回答

GitLens有一个很好的Git历史浏览器。从扩展市场安装GitLens,然后从命令面板运行“Show GitLens Explorer”。

很明显,GitLens是Git历史上最受欢迎的扩展。

我最喜欢的是它可以为你提供侧注释,当一些行已经改变了最后一次,由谁。

在Visual Studio Code 1.44或更高版本中,你不需要一个插件来查看提交历史。

Timeline view This is a unified view for visualizing time-series events (for example, Git commits, file saves, test runs, etc.) for a file. The Timeline view automatically updates showing the timeline for the currently active editor, by default. You can control this default behavior by toggling the eye icon in the view toolbar. Also, similar to other views, the Timeline view supports find or filter as you type. The Timeline view is collapsed by default at the bottom of the File Explorer. Selecting the Timeline sash will expand the Timeline view. [...] Here is the Timeline view in action:

我向您推荐这个存储库,https://github.com/DonJayamanne/gitHistoryVSCode

转到历史记录

它完全满足了您的需要,并具有以下功能:

查看提交的详细信息,如作者名称、电子邮件、日期、提交者名称、电子邮件、日期和评论。 查看该文件的先前副本或将其与本地副本进行比较 工作区版本或以前的版本。 在编辑器中查看对活动行的更改(Git Blame)。 配置列表中显示的信息 使用键盘快捷键查看文件或行的历史记录 查看Git日志(以及提交的详细信息,如作者姓名、电子邮件、评论和文件更改)。

你不需要一个扩展来做这个,你可以去资源管理器,然后时间轴。

如果你不希望它出现在资源管理器中,你可以将它拖放到侧边栏,或者源代码控制或任何你想要的地方!

如果你想要更花哨的功能,如可视化和所有的东西,你需要一个扩展。