有没有办法使用Visual Studio Code从原始人/母版中查看git diff? [英] Is there a way to see git diff from origin/master using Visual Studio Code?
问题描述
使用Visual Studio代码(1.11.2版),通过单击左侧面板中的 Source Control 按钮,可以非常轻松地看到当前更改的并排图形差异.但是,一旦将这些更改提交到本地存储库后,就无法找到一种方法来查看来自Origin/master的相同并排差异.
Using Visual Studio Code (version 1.11.2), I can see a side-by-side graphical diff of my current changes very easily by clicking the Source Control button in the left panel. But once I commit those changes to my local repository, I am unable to find a way to see the same side-by-side diff from origin/master.
换句话说,有没有一种方法可以使用Visual Studio Code(版本1.11.2)的生成比较工具向我展示我执行git diff origin/master
时看到的内容,但是在并排图形差异中也是如此?
In other words, is there a way to the spawn comparison tool of Visual Studio Code (version 1.11.2) to show me what I see when I do git diff origin/master
, but in the side-by-side graphical diff too?
推荐答案
您可以为此使用扩展名.
You can use an extension for this.
两个不错的选择:
Gitlens:: https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens
通过此操作,您可以使用>GitLens: Compare File with...
动作与任何分支(本地或远程)进行比较.
With this one, you can use the >GitLens: Compare File with...
action to compare with any branch (local or remote).
您还可以使用 Git历史记录: https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory
您可以查看整个文件历史记录,并通过>Git: View File History
操作将其与当前版本进行比较.
You can see the entire file history and compare with the current version with the >Git: View File History
action.
这篇关于有没有办法使用Visual Studio Code从原始人/母版中查看git diff?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!