git visual diff between branches

前端 未结 16 2005
独厮守ぢ
独厮守ぢ 2020-12-12 08:35

This answer is great for seeing a visual diff between two files that are checked into git: How do I view 'git diff' output with a visual diff program?

Howev

16条回答
  •  不思量自难忘°
    2020-12-12 09:34

    Here is how to see the visual diff between whole commits, as opposed to single files, in Visual Studio (tested in VS 2017). Unfortunately, it works only for commits within one branch: In the "Team Explorer", choose the "Branches" view, right-click on the repo, and choose "View history" as in the following image.

    Then the history of the current branch appears in the main area. (Where branches that ended as earlier commits on the current branch are marked by labels.) Now select a couple of commits with Ctrl-Left, then right click and select "Compare Commits..." from the pop-up menu.

    For more on comparing branches in the Microsoft world, see this stackoverflow question: Differences between git branches using Visual Studio.

提交回复
热议问题