Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
451 views
in Technique[技术] by (71.8m points)

IntelliJ: Viewing diff of all changed files between local and a git commit/branch

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).

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).

Does anyone know how to do this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This has now been implemented. In order to compare two branches you do:

  1. Check out one of the branches you want to compare with.
  2. Select the branch you want to compare with in the Git branch popup in the status bar in the bottom right of the IntelliJ window. A popup with some options is shown.
  3. Select the "Compare" option.
  4. This by default shows all the commits you can also select the "Diff" tab to show the actual changes.

This is all described in much greater detail in one of their blog posts.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...