Mohammad Chamanpara
Mohammad Chamanpara

Reputation: 2159

TFS Source Control - Replacing all items with a source out of sourceControl

I am using TFS source control on which we have a C# project on Visual Studio 2013. My latest version is in a solution out of source control and I want to replace all my SourceControl files with it. Can any one show me best way to do this.

Any helps would be appreciated in advance.

Upvotes: 2

Views: 2868

Answers (1)

Cole W
Cole W

Reputation: 15293

What I would do in that situation is to manually check out all the files in TFS in source control explorer and copy the latest version of the source code on top of the checked out version replacing any files that windows tells you about.

After you have copied over all the files you will need to add any files that were added under the non-source controlled solution manually as well by either right clicking the folder in tfs and clicking "Add Items To Folder" or single clicking the project folder in question and clicking the green "+" button to do the same thing. You should then select any files that need to be checked in from the dialog visual studio presents you with.

Finally you will have to check in all the pending changes in your workspace and at that point you will have the latest version in TFS. There might still be files that were removed from the non-source controlled solution that you may have to manually delete from source control explorer as well.

Upvotes: 4

Related Questions