1

Have you encountered this problem before?

In my IDEA, the Git history shows the file was changed, some code was removed.

But if I copy the vision number to the commit message, it shows the file was newly added.

Some details:

In my IDEA, it shows that accountRoleLocalService has been deleted.

enter image description here

In the Git ID link, the class file seems new added.

https://github.com/JanisZhang/liferay-portal/commit/792b40a3dfbbd6a89347f38e724fccbdb863f984

Anyone can give me a hand?

Hasan Haghniya
  • 2,347
  • 4
  • 19
  • 29
  • After I click resume git log Indexing it seems consistent with the gitk history. but it's weird the commit message says Delete xxxxx but actually added a file... – Janis Zhang Sep 26 '22 at 07:44

1 Answers1

0

What you see is a refactoring, where a file:

  • has been renamed
  • has been edited to delete portion of the code

Said deleted portion has been reported to a new separated file.

Sometimes Git reports a rename as a deletion + creation (also explained here).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250