Is there a way to see git diff from origin/master using Visual Studio Code?

前端 未结 5 1948
感动是毒
感动是毒 2021-01-31 13:41

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 p

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-31 13:49

    From Using Version Control in Visual Studio Code:

    Add this to the Git configuration file, like ~/.gitconfig:

    [diff]
        tool = vscode
    [difftool "vscode"]
        cmd = code --wait --diff $LOCAL $REMOTE
    

    When using git difftool HEAD HEAD^, Git will ask if to use Visual Studio Code.

提交回复
热议问题