Getting VS2010 / Resharper to "git move" during refactoring

Is there an extension for Visual Studio 2010 / Resharper that will cause files moved or renamed during refactoring to be git moved accordingly? Right now, every time I move a file, I need to manually git rm / git add , otherwise if I git move , then I need to go into Visual Studio so that it recognizes the moved files.

I am using Visual Studio 2010, Resharper 7.1.2, Git Bash (git version 1.8.1.2) and the Git Source Control Provider .


Update: I know that Git automatically detects moves as soon as files have been added and added. But I don’t want to manually rewrite every file that has been moved, and since other tools (like IntelliJ IDEA) seem to be able to do this for me, it seems reasonable that VS should also be able to.

+4
source share
1 answer

For me (with VS2012, msysgit and Git, the source control provider ) it works as follows:

  • I will rename the class using ReSharper CR CR.
  • ReSharper automatically renames file
  • In the Pending Changes view, I get “Delete” the old file name and “Create” with the new file name.
  • I save all the files, after which the project file is displayed as Modified.
  • In Pending Changes, I check the check-all box, write a comment, and click the commit button.
  • Done.

This also works when I move files between folders in VS.

I do not quite understand where you will need to do the git rm or git mv manual

0
source

Source: https://habr.com/ru/post/1469358/


All Articles