For example, you can always `git mv` the Java file to the Kotlin file and only then transform it, which keeps your history.