Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can intellij show me the changes of the last x commits as if they were just made?

I am about to have an over-the-shoulder code review but my changes consist of multiple commits. It would be convenient if intellij-idea could show them all to me as if they were new changes because they would be a lot easier to find that way.

Does intellij have a built in way to do the equivalent of this:

git checkout -b temp-for-code-review
git reset --soft HEAD~x #x is a number of commits I want reviewed

If I do this in git, intellij will show changes exactly the way I want, but I'm wondering if there's a way to do this built into intellij.

like image 280
Daniel Kaplan Avatar asked Jan 30 '15 01:01

Daniel Kaplan


1 Answers

Navigate to the Changes menu (Command + 9 or Ctrl + 9), and highlight all of the commits that you want to review. Then, diff the highlighted changes (Ctrl + D or Command + D).

This has the advantage of not needing to spin up another branch, or allowing you to show the changes that you have truly done and commited locally on whatever branch you're on.

like image 87
Makoto Avatar answered Sep 21 '22 12:09

Makoto