Undo changes in another user's workspace
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
Visual Studio 2019 | Visual Studio 2022
Occasionally a team member is blocked from checking in a file that someone else has locked. You can use Team Foundation Version Control (TFVC) commands in this situation:
- To delete pending changes in another user's workspace, use the
tf undo
command. - To remove an exclusive lock on a file but not the pending changes, use the
tf lock
command. For more information, see Lock command. - To delete another user's workspace, use the
tf workspace
command. For more information, see Remove a workspace.
Prerequisites
To undo pending changes in another user's workspace, you must have the Administer workspaces permission set to Allow. For more information, see Default TFVC permissions.
Undo the changes in another user's workspace
Open Developer Command Prompt for your version of Visual Studio.
Enter the following command at the command prompt. Replace the arguments with values that are appropriate for your needs.
tf undo /workspace:<other-user-workspace>;<other-user> $/<project-path>/<file-name> /collection:<team-project-collection-url>
For example, you might enter the following command:
tf undo /workspace:OtherUserWorkspace;OtherUser $/TeamProject/MyFile.cs /collection:https://YourTFSServer:8080/tfs/YourCollection
For more information, see Undo command.
Related articles
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for