Check Out and Edit Files

When you want to edit a file you can open it from Solution Explorer or from Source Control Explorer. When you begin editing a file, it is automatically checked out to you. In rare situations (for example, you want to check out and lock the file to make sure your changes are checked in before changes from other team members), you might need to manually check out (and optionally lock) an item.

To manually check out items

As a best practice, use the Lock type option with discretion and notify your teammates why you are locking an item, and when you plan to remove the lock.

On the Lock type menu, choose:

Unchanged: Do not apply a lock to the items.

Check Out: Prevent other users from checking out and checking in the items until you check in and unlock them.

Note

In Visual Studio Team Foundation Server 2012 this option is not available if you are using a local workspace. Also, this lock is not enforceable because other users might be using local workspaces. See Understand Lock Types.

Check In: Allow other users to check out the items you are checking out, but prevent them from checking in their changes until you check in your changes and unlock the items.

Note

The Lock type menu is not available if:

Another team member has locked the file.

The Enable multiple check-out option has been cleared (not a recommended practice) by an Administrator of your team project. Administrator: On the menu bar, choose Team, Team Project Settings, Source Control).

In Solution Explorer and in Source Control Explorer, a check mark appears next to the items that you have checked out. In Team Explorer, a pending edit change to the file is displayed on the Pending Changes page. In Source Control Explorer, a pending edit change is visible to you and to members of your team.

To help you and your team organize and track your work, you should use the My Work or Pending Changes page to associate a task or a bug with the work you are doing. See Develop Code and Manage Pending Changes.

If you use a server workspace, files that you have not checked out are read-only.