Converting file (tracked with Git) from Java to Kotlin in Android Studio

前端 未结 4 2236
梦毁少年i
梦毁少年i 2021-02-12 04:50

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

4条回答
  •  一生所求
    2021-02-12 05:43

    Git doesn't actually track renames directly; it infers them based on file add/delete pairs. I assume that Idea is running a git add when it renames, whereas Android Studio is just deleting the old files. Try running git add yourself on the new files and a git rm on the old files and Git should show them as renames.

提交回复
热议问题