https://kotlinlang.org logo
c

christophsturm

08/27/2019, 3:08 PM
if i convert a java file to kotlin, is there an easy way to git diff the kotlin file with the original java file? can i tell idea to diff a file with a different file?
k

karelpeeters

08/27/2019, 3:30 PM
You can select arbitrary files and even the clipboard, search "compare" in the action list (Ctrl+Shift+A)
c

christophsturm

08/27/2019, 3:59 PM
yes but does it also work with git? (example: compare User.kt from my branch with User.java from master)
m

Mike

08/27/2019, 7:08 PM
Likely not as Git won't see it as a move so you can't compare history. It would be a very specific command to git to compare 2 independent files. You could try selecting the added and deleted files in version control view and see if compare is on menu.