How to change casing of a file that in under version control in Team Services Online?

To change the casing of a file name under Git we can use git mv command as specified here.

How do we achieve the same result in TFS?

We have a large collection of team projects (more than 150 team projects) and each team project is broken down into 6 Visual Studio projects at least, that makes at least 900 Visual Studio projects. Now in some of them we have Web.config file and in some of them web.config file. The point is, we're creating some automated QA/QC tools that need a consistent casing across our projects.

We want to change the lowercase web.config to PascalCased Web.config in all files.

We change file names on Windows, but TFS doesn't recognize it as change. We use Source Control Explorer to rename files there, and still it doesn't recognize the change.

We used tf rename web.config Web.config and it complains that the file already exists. We're stuck at this point. Any ideas?

Upvotes: 0

Views: 542

Answers (1)

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30392

Make sure the files are really in source control which are not prevented tracking by your settings (.gitignore or .tfignore ).

Try to get latest first (In Source Control Explorer right click the project node --> Get Latest Version ). Then rename the files. I tested on my side and the rename from lowercase web.config to Uppercase Web.config works as expected.

If that still not work, you can try to remap the workspace or create a new workspace to check that again.

Besides, you can also try to rename the file from web portal.

enter image description here

Upvotes: 1

Related Questions