Undo Checkout

Sometimes a developer working on a file needs to abandon his recent changes and roll the file back to a previous version. The undo checkout feature allows the developer to do this without impacting the original source files.

When a user opens a file under source control for editing, Visual Studio 2005 copies the original file to a local workspace for editing. Changes are not made to the original file until the user checks in the file and commits changes. Sometimes a user does not want to commit their changes to the source. For example, the code may have been checked out for testing purposes, or a proposed change may have caused other problems for the application.

When a developer uses the undo checkout feature, changes to the code are abandoned, the checkout is cancelled, and the original file is not changed.

The undo checkout feature is accessed through the Source Code Explorer in Visual Studio 2005 or from the Visual Studio 2005 command prompt.

Undoing changes to a file