Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Manage Pending Changes

Develop Code and Manage Pending Changes

Most changes that you make to your files are queued as pending changes. As you work, you can organize, manage, and get details about what you’ve changed.

Required Permissions

You must be one of the Contributors for your team project. See Team Foundation Server Default Groups, Permissions, and Roles.

What do you want to do?

Solution Explorer is probably the hub of the development work you do.

Note Note

We recommend you use the following approach instead of the Open from Source Control dialog box.

To open a solution under version control

  1. On the menu bar, choose View, Team Explorer.

  2. In Team Explorer, choose Home icon Home, and then choose Source Control Explorer.

  3. In Source Control Explorer, navigate to the folder that contains your solution, and then then double-click it. (Keyboard shortcut: open the shortcut menu and choose View.)

To display Solution Explorer

  • On the menu bar, choose View, Solution Explorer (Keyboard shortcut: Ctrl + Alt + L).

Solution Explorer with Test and Class projects

When you open and modify a file from Solution Explorer, the file is automatically checked out for you. Icons appear to indicate which files you have not changed TFSC Checked-In Status Icon, those you have checked out TFSC Checked-Out Status Icon, and those you have added to the solution TFSC Pending Addition Status Icon.

See Using Solution Explorer.

If you’re using Visual Studio Premium or Visual Studio Ultimate, you can use the My Work page in Team Explorer to manage your work. In Team Explorer, choose Home icon Home, and then choose My Work.

To Do List on My Work Page in Team Navigator

You can use My Work to:

  • Track your work against tasks

  • Suspend and later resume your work (including file changes, associated tasks, and Visual Studio state such as window positions and breakpoints)

  • Request a code review

For a step-by-step example, see Day in the Life of an ALM Developer: Write New Code for a User Story, and Day in the Life of an ALM Developer: Suspend Work, Fix a Bug, and Conduct a Code Review.

  • Tip You can control the kinds of work items that appear in the Available Work Items section. You can choose one of the default options, or you can choose any of your personal queries that are contained in the root My Queries folder. To work with these queries, in Team Explorer choose Home icon Home, and then choose Work Items.

  • Tip When you move a work item to Available, In Progress, or Suspended, the work item state or comments are updated so that your team is automatically advised on the status of your work. For example, the task board for your team is updated to show your status. See Agile Planning and Iterations.

  • Tip If your team project contains customized work item type definitions, you might have problems using My Work, unless an Administrator for your team project has taken certain steps. See Customize Process Configuration and Update a Customized Process Template to Access New Features.

You can use the Pending Changes page in Team Explorer to manage your work. In Team Explorer, choose Home icon Home, and then choose Pending Changes. The Pending Changes page is also displayed whenever you begin the check-in process.

Checking in the pending changes

Almost every change that you make to the files on your dev machine is stored in your workspace as a pending change until you check it in:

If you are working in a local workspace, Visual Studio can detect changes that you make outside the system. If you edit a file outside Visual Studio (for example, in Notepad) the change automatically appears in your Included Changes.

If you add or remove a file outside Visual Studio, for example, in Windows Explorer (File Explorer in Windows 8), the Detected changes link appears in the Excluded Changes section. Choose this link if you want to include these changes. The Promote Candidate Changes dialog box appears. You can open the shortcut menu of added items and choose Browse in Windows Explorer to display them or Delete from disk to delete them.

Note Note

Empty folders will not appear.

If items that you don’t need to check in are appearing regularly in the Promote Candidate Changes dialog box, you can select one of them, open its shortcut menu, and choose Ignore this local item to ignore the item. You can also choose Ignore by extension or Ignore by file name to create a file that will cause Visual Studio to systematically ignore this kind of file. For more information on .tfignore files, see Add Files to the Server.

Sometimes you need to remind yourself about what you’ve changed in a file.

To see what you changed from Pending Changes

  • On the Pending Changes page, open the shortcut menu for the item and choose:

    • Compare with Workspace Version to see what you’ve changed to the version in your workspace

    • Compare with Latest Version to see how your changes compare to the latest version of the file in your team’s codebase

To see what you changed from Solution Explorer or from Source Control Explorer

  1. Locate and select the item in Solution Explorer or in Source Control Explorer.

  2. Open the shortcut menu for the item, and then choose Compare.

  3. On the Compare dialog box, from the Type menu, choose:

    • Workspace Version to see what you’ve changed to the version in your workspace

    • Latest Version to see how your changes compare to the latest version of the file in your team’s codebase

    • One of the other options: Changeset, Date, or Label.

  4. Choose OK.

The Diff window appears. See Compare Files.

You can discard one, a few, or all of the pending changes in your workspace.

Note Note

A few other options:

To undo a few of your pending changes

  1. In Solution Explorer, the Pending Changes Window, or Source Control Explorer, select one or more items, open their shortcut menu and choose Undo or Undo Pending Changes.

    Tip Tip

    To undo all changes you have made in your solution or a code project, open the shortcut menu, and then choose Undo Pending Change.

  2. In the Undo Pending Changes dialog box, make sure the changes you want to undo are selected, and then choose Undo Changes.

To undo all your pending changes

  • On the Pending Changes page, choose the Actions link, and then choose Undo All.

  • Status Command : Display pending changes in the command prompt.

  • Checkin Command : View pending changes in the Check In dialog box.

  • Undo Command : Undo pending changes.

    Tip Tip

    You can use this command to undo another user’s check-out if you have sufficient permissions.

  • Difference Command : See what you have changed in a file.

Show:
© 2015 Microsoft