A conversion from Java to Kotlin in Android Studio 2.3.2 (in 3.0 the same behaviour) creates a new file and deletes previous. So Git doesn\'t know anything about this conversion
In case this might help a future reader:
If you use the Git commit dialog integrated with IntelliJ (Commit via Ctrl+K), there is a checkbox on the right in recent versions: ☑ Extra commit for .java > .kt renames
Submitting the dialog this way will create two commits, the first one being just .java
files renamed into .kt
files with no content changes. This helps Git track the content.
Git guesses renames from added/removed file pairs, but only if these files are close enough, i.e. if the file was renamed with no or small amount of changes.
When you apply java-to-kotlin conversion usually every line of a file changes, so that git cannot find that these old and new files somehow relate to each other.
You can use the following two-stage approach instead:
.java
file to .kt
and commit it;.kt
file.