更改 class 名称是否考虑重构?

Is changing class name considered refactoring?

为了避免父 classes 和子 classes 的不同名称混淆,我决定将父 class 的名称更改为更合适的名称。当我提交此更改时,git 上的提交消息是否应以“Refactor ...”开头?

是的,很多人认为重命名是一种重构行为,包括本书的作者 Martin Fowler Refactoring

例如

来自https://code.visualstudio.com/docs/editor/refactoring

Renaming is a common operation related to refactoring source code

来自 https://www.jetbrains.com/help/idea/rename-refactorings.html

Renaming local variables or private methods can be done easily inline since only the limited scope is affected. Renaming classes or public methods could potentially impact a lot of files. Preview potential changes before you refactor.