How to save change log in git files when refactoring in IntelliJ?

When I reorganize a class in IntelliJ, does git lose track of the old file log? Is there a way to refactor a file so that it stores a log, or am I missing something?

I check the file log in SourceTree, but I think it is the same for everything.

+5
source share
2 answers

The move / rename is handled automatically by git, and the log should be kept if git detects that it is really a move. It doesn't matter if you rename from IDEA, terminal or file manager.

. git "" ? .

+2

, , , , , git ( ) , ( com.something com.somethingelse ~ 300 ):

  • IntelliJ, "git mv", . "git mv MyProject\src\main\java\com\something MyProject\src\main\java\com\somethingelse"
  • IntelliJ text-replace - Edit > Find > Replace in path com.something com.somethingelse.
0

All Articles