Relative Content

Tag Archive for gitandroid-studiorenamegit-history

After renaming file in Android studio it is deleting from git (and lost history)

For some reason, when I rename a file in Android Studio through the “refactor -> rename…” menu, the file is displayed in Git as new and the old file is deleted. Here’s an example:
There is a file Utils, I renamed it to LauncherIntentHelper
In this case, Utils is marked as deleted and LauncherIntentHelper as newly added, so git history for Utils are lost.