Context
I often move, rename files in Visual Studio 2022. Rename is a standard refactoring practice. However when I rename a file in Solution Explorer, not git mv
operation is performed, instead git delete and git add.
This causes loosing the history of that particular file/class, which is a great loss in many cases.
Question
I can do the move operation leaving the IDE and using command line
git mv myoldfile.cs mynewfile.cs
which will keep history perfectly, but leaving the IDE is a productivity killer, especially when talking about refactoring and renaming multiple classes/files.
How to perform git mv
within Visual Studio, instead of git delete and git add, when renaming, moving files in Solution Explorer?