TFS command TF: Undo (force file checked in by someone else)

Source: Internet
Author: User

2010-03-20 15:11:04| Category:Configuration Management| Tag:TFS|Font Size Subscription

We are using TFs Source code During management, the source Code Management creates a work zone on each customer's PC and maps the work zone to the source code folder on the server. During Normal check-in and check-out, our source code will be operated in the workspace of the server to the client. However, once a project team member checks out the code on leave or before leaving the company, the check-out lock is added, if other members of the project team want to modify the locked file, or the TFS administrator wants to delete the project in source code management, the problem occurs, because we cannot exit and checkout through the team explorer graphical interface, we can only use the TFS command: Undo to perform operations and forcibly withdraw the files checked out by others.

1. Enter "cd c: \ Program Files \ Microsoft Visual Studio 8 \ common7 \ ide" (TF Program In the folder) 2. Find the workspace used by the user, and perform the following operations: TF workspaces/owner: MJ/Server: http: // 192.168.111.216: 8080

3. view the pending changes of the person: TF status/Server: http: // 192.168.111.216: 8080/workspace: */User: MJ

4. Undo his checkout (Force) as follows:

 

TF Undo/workspace: mjbook (workspace name); MJ (username) $/XXX/XXXXX/AAA. csproj (file path)/Server: http: // 192.168.1.200: 8080 (TFS server)

Eg: TF Undo/workspace: mjbook; MJ $/JY-ADSCS2.0/JY-ADSCS2.0/01 development/src/elawcounty/web/bin/countymine. dalfactory. XML/Server: http: // 192.168.111.216: 8080

5. End.

Problem added: Sometimes the workspace does not exist and the execution of Undo fails, for example: The solution is as follows: View the workspace of the project team member:
TF workspaces/Server: http: // 192.168.111.216: 8080/owner: PJC or TF workspaces/computer: PING-PC/Server: http: // 192.168.111.216: 8080/owner: PJC

 
Delete Workspace:
TF workspace/delete PING-PC; PJC/serverhttp: // 192.168.111.216: 8080
Refresh your team explorer and check if the locked file is missing.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.