-1

I'm writing code in a TFS 2013 Project. I'd like to check it into a different Project on the same server. Can I do this? Thanks

1 Answers1

0

You can not directly check in the code to another project, you need to add the code file to another project first for source control, then check in the code changes.

In visual studio Team Explorer:

  1. Connect To TFS project 1, configure the workspace and map source code to local folder1. Open the folder1 in windows explorer.
  2. Connect To project 2, configure the workspace and map source code to local folder2. Open the folder2 in windows explorer.
  3. Copy the code file which you want to check into another project (eg, project 2 here ) from folder1 to folder2, then the system will detected the new added files under Pending Changes > Excluded changes.
  4. Click the Detected link to Promote the new added files.
  5. Check in the files to Project 2

Refer to these articles for more information : Add files to the server and Check in your work to the team's codebase


UPDATE:

You can link to the WI in the same collection, but cannot link to the WI which in another collection.

That means, if the team projects are in the same collection, then you can link the WI (associate with the changeset) which belongs to another project directly.

enter image description here

Community
  • 1
  • 1
Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55
  • Thank Andy! Our process will be to include a link to the WI on the other project. – Mitch Newland Oct 13 '17 at 18:50
  • @MitchNewland If the "**other**" project is in the same collection with your current project, then you can link the WI directly when check in the changes. You cannot link to the WI which in another collection. – Andy Li-MSFT Oct 16 '17 at 09:22
  • Correct. Same collection, different project/team is the only thing that works. – Mitch Newland Oct 25 '17 at 01:36