我可以从Visual Studio Code中执行各种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:
其他回答
在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:
我强烈推荐使用GitLens和GitGraph的组合。
下面的快照突出显示了gitlens是如何随时间显示提交的
下面这张图片是非常生动的GitGraph
在Visual Studio Code中,使用Gitlens扩展还有另一种方便的方法来浏览文件的提交历史。
它提供了两个功能,“文件历史记录”和“线路历史记录”,一旦安装了Gitlens,就可以从VCS菜单中访问它们。
完整的解释与例子和文件参考提供在这个答案。
Git Graph似乎是一个不错的扩展。安装完成后,您可以从底部状态栏打开图形视图。
当您打开文件或欢迎页面时,您将在右上角找到要单击的正确图标。
你可以添加一个键盘快捷键:
推荐文章
- 如何将git配置存储为存储库的一部分?
- 如何修改GitHub拉请求?
- 如何在Github和本地删除最后n次提交?
- 我如何调试git/git-shell相关的问题?
- 错误:无法使用rebase进行拉取:您有未分阶段的更改
- Git隐藏未缓存:如何把所有未分期的变化?
- 真实的恶魔
- 如何从另一个分支获得更改
- 如何设置每个文件类型的标签大小?
- 我如何添加环境变量启动。VSCode中的json
- Git:权限被拒绝(publickey)致命-无法从远程存储库读取。克隆Git存储库时
- git reflog和log有什么区别?
- git推挂在Total line之后
- 重命名git子模块
- 如何格式化Visual Studio Code项目中的所有文件?