다음을 통해 공유


Merges command (Team Foundation Version Control)

TFS 2017 | TFS 2015 | TFS 2013

Visual Studio 2019 | Visual Studio 2017 | Visual Studio 2015 | Visual Studio 2013

The merges command displays detailed information about past merges between the specified source and destination branches.

Prerequisites

To use the merges command, you must have the Read permission set to Allow for both source and destination branches. For more information, see Default TFVC permissions.

Syntax

tf merges [source] destination [/recursive] [/extended] [/format:(brief|detailed)] [/login:username, [password]] [/showall]]] [/collection:TeamProjectCollectionUrl]

Parameters

Argument

Argument

Description

source

Filters the merge history to include only entries with the specified sources.

This parameter is optional.

destination

Specifies the destination branch for which merge history is displayed.

This parameter is required.

username

Provides a value to the /login option. You can specify a username value as either DOMAIN<em>UserName or UserName.

TeamProjectCollectionUrl

The URL of the project collection that contains the branches about which you want to display the merge history (for example, http://myserver:8080/tfs/DefaultCollection).

Option

Option

Description

/recursive

Displays information for all merges in specified Team Foundation version control server folder and its subfolders.

/extended

Displays a list of merges for a specific range of target items (for example: tf merges tgt\file1.txt; C21-25). This option displays the types of merges (for example, add or edit) and detailed information about the source and target items. This option implies /format: Detailed.

Note

You cannot use this option if you have specified a source item.

/format

Specifies the formats in which merge history can appear:

  • Brief: default value, shows the changeset numbers for both the source and target items and the author and the date of the target checkin.
  • Detailed: shows the detailed paths and changeset numbers for both the source and target items.

/login

Specifies the user name and password to authenticate the user with Azure DevOps.

/showall

Displays all past merges for a given target item under its current name and all previously used names.

/collection

Specifies the project collection.

Remarks

For more information on how to find the tf command-line utility, see Use Team Foundation version control commands.

Examples

The following example displays information about all merge operations performed between Beta1_branch and RTM_branch.

c:\projects>tf merges /recursive Beta1_branch RTM_branch
  • Sample output:

    Changeset  Merged in Changeset   Author   Date
    --------------------------------------------------------
    135         162                   Justin     10/31/2003
    146         162                   Justin      10/31/2003
    147*        167                   Bill       11/02/2003
    

    The asterisk '*' next to changeset 147 indicates that only some of the changes in that changeset #147 were merged into changeset #167.