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.

Required permissions

You must be one of the Contributors for your team project. See TFS default groups, permissions, and roles [redirected].

What do you want to do?

  • Check out an item

  • Work from the command prompt

  • Get tips

Manually check out items

To manually check out items

  1. In Solution Explorer or in Source Control Explorer, select the files that you want to edit, open their shortcut menu, and choose Check Out for Edit.

  2. (Optional) You can lock the file.

    Important

    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).

    If any other users have locked any of the specified items, the lock operation will fail. For more information, see Lock and unlock folders or files.

  3. Choose Check Out.

In Solution Explorer and in Source Control Explorer, a check mark TFSC Checked-Out Status Icon 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.

Work from the command prompt

Tips