IntelliJ:查看本地和 git commit/branch 之间所有更改文件的差异 [英] IntelliJ: Viewing diff of all changed files between local and a git commit/branch

查看:46
本文介绍了IntelliJ:查看本地和 git commit/branch 之间所有更改文件的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 IntelliJ 的差异查看器是一种非常好的代码审查方式,因为您可以使用 IntelliJ 代码编辑器的所有功能(重构、完成等)在本地版本中进行更改.

Using IntelliJ's diff viewer is a very nice way to review code because you can make changes in your local version with all the capabilities of the IntelliJ code editor (refactoring, completion, etc).

不幸的是,当您在 IntelliJ 中进行代码审查时,我还没有弄清楚如何做最重要的事情,即:查看工作树中所有更改文件的差异(检出到您想要查看的分支)合并自)和另一个分支(您计划合并到的分支,例如master").

Unfortunately I have not worked out how to do the most important thing when you're doing code reviews in IntelliJ, namely: Looking at the diff of all the changed files in the working tree (checked out to the branch you want to merge from) and another branch (the branch you plan to merge into, e.g. "master).

有人知道怎么做吗?

推荐答案

虽然 Jon Tirsen 的回答是正确的,但您需要通读全文才能理解如何做到这一点.

Though Jon Tirsen's answer is correct, you need to go through entire text in order to understand how to do that.

这是在 mac 中相同的图像.

Here's the images of the same in mac.

  1. 我目前正在使用 hello_world 并想与 master 进行比较.

更新:在新的用户界面中,点击Show Diff with Working Tree

UPDATE: In the new UI, click on Show Diff with Working Tree

  1. 接下来会弹出一个窗口.选择 Files 并按 cmd + d

  1. 另一个显示差异的窗口.您可以执行许多不同类型的差异.使用 cmd + shift + ]cmd + shift + [ 在文件之间切换.
  1. Another window which shows diff. You can perform many different types of diff. Use cmd + shift + ] and cmd + shift + [ to shift between files.

差异提示:IntelliJ 提供了高级差异功能.您可以在第三张图片上查看.

Diff Tip: IntelliJ provides advanced diff features. You can check those on the 3rd image.

这篇关于IntelliJ:查看本地和 git commit/branch 之间所有更改文件的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆