Blankman
Blankman

Reputation: 267280

IntelliJ git integration tips and tricks

I actually ignored the git integration that IntelliJ has and I was recently frustrated with the diff tools that git comes with by default, I noticed how intellij has a very nice way of seeing the history for a given file, and comparing previous versions etc.

What are some cool/useful git integration tips and tricks you like with IntelliJ?

  1. I would like to see some keyboard shortcuts, like if I am on a file, I want to quicky open up the history view or compare with the last commigted file.

  2. Is it possible to compare commits? (not just a single file)

BTW, what diff tool does IntelliJ use by default, it's pretty good!

Upvotes: 3

Views: 2557

Answers (1)

Daniel Miladinov
Daniel Miladinov

Reputation: 1592

You can view IntelliJ IDEA's default keymap reference card to see what's available starting out.

I don't believe there is a default keyboard shortcut assigned to showing the current file history, but you can specifically assign a shortcut to show file history:

Settings → Keymap → (in the search box on the right type: "history" to narrow the options) → assign your desired keyboard shortcut to "Git: Show History"

While it is definitely possible to compare various revisions of a file from different commits, I'm not sure what else you would want to do to compare commits beyond the scope of a single file, but when reviewing commits, you can view all of the changes in the commit, showing all the diffs, one file at a time.

As far as their diff tool is concerned, I believe it was internally developed and is part of their version control featureset.

Upvotes: 6

Related Questions