We use GIT and Visual Studio 2013 (Ultimate + Professional versions). The code for the solution and projects is in GIT and anytime we rename the file in Visual Studio, GIT sees them as
Before rename
c:\temp\testCodeSnippets>git status
# On branch master
nothing to commit (working directory clean)
After rename (from Visual Studio)
c:\temp\testCodeSnippets>git status
# On branch master
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# deleted: OldName.cs
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# NewName.cs
no changes added to commit (use "git add" and/or "git commit -a")
Renaming via git mv
c:\temp\testCodeSnippets>git mv OldName.cs NewName.cs
c:\temp\testCodeSnippets>git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# renamed: OldName.cs -> NewName.cs
#
Basically, the renames performed in VS still need some manual work. Equally important; a lot of these renames happen when refactoring from inside the IDE i.e. a class/member/etc gets renamed and all references get changes. If the namespace or classname changes, the files get renamed.
So, is there any setting to toggle, any tool to install, any deity to appease so that renames from Visual Studio get mapped as renames to GIT too (like git mv
does to make it smooth)?