admin管理员组

文章数量:1430512

Following this question, when moving files in Visual Studio 2019 via cut/paste, Git doesn't properly track the file movement - it marks the file as deleted in the original location and untracked in the new location.

I've created a cmd batch script to fix this by:

  1. Finding deleted files
  2. Locating their old positions and moving them back
  3. Then using git mv to properly move them to the new location

This seems to be working, but I'm looking for a more proper/integrated solution within Visual Studio.

Question: What's the recommended way to move files in Visual Studio 2019 while maintaining proper Git history?

I'm specifically interested in Visual Studio's built-in features or extensions that might handle this better.

本文标签: