## zowe › endevor › merge › element

Merge Endevor elements from one Endevor location into another. Requires an initialized Endevor workspace to perform conflict resolution. Use "synchronize workspace" command afterwards to push the result back into Endevor.

#### Usage

zowe endevor merge element [element] [options]

#### Positional Arguments

- `element` (string)

  - Name of the Endevor element

#### endevor-location definition options

- `--environment` | `--env` (string)

  - The Endevor environment where your project resides.

- `--system` | `--sys` (string)

  - The Endevor system where your project resides.

- `--subsystem` | `--sub` (string)

  - The Endevor subsystem where your project resides.

- `--type` | `--typ` (string)

  - Name of the Endevor element's type.

- `--stage-number` | `--sn` (string)

  - The Endevor stage number where your project resides.

    Allowed values: \*, \%, 1, 2

- `--ccid` | `--cci` (string)

  - The CCID you want to use when performing an Element action.

- `--comment` | `--com` (string)

  - The comment you want to have when performing an Element action

- `--instance` | `-i` (string)

  - Specifies Endevor Web Services dataSource name.

#### merge-location definition options

- `--merge-environment` | `--menv` (string)

  - Merge elements from this environment to the target environment (specified by 'environment'). Defaults to the same environment as the target.

- `--merge-stage-number` | `--msn` (string)

  - Merge elements from this stage number into the target stage number (specified by 'stage-number'). Defaults to the same stage number as the target.

- `--merge-system` | `--msys` (string)

  - Merge elements from this system into the target system (specified by 'system'). Defaults to the same system as the target.

- `--merge-subsystem` | `--msub` (string)

  - Merge elements from this subsystem into the target subsystem (specified by 'subsystem'). Defaults to the same subsystem as the target.

- `--merge-out-of-sync` | `--moos` (boolean)

  - Merge out-of-sync elements at the target location with their next version in the map, and attempt to resolve the out-of-sync during the next synchronization with Endevor.

#### workspace options

- `--workspace-dir` | `--wsp` (string)

  - The Endevor workspace directory, if different from current working directory.

    Default value: .

- `--dry-run` | `--dr` (boolean)

  - List all actions the synchronization would perform, without executing them.

- `--limit` | `--lim` (number)

  - If the synchronization would need to perform more than 'limit' Endevor actions, do not perform the actions now, only report them. 0 means no limit.

    Default value: 0

#### options

- `--override-signout` | `--os` (boolean)

  - Specify if you want to override the Signout of any Endevor elements affected by this action.

- `--signout` (boolean)

  - Specify if you want to perform the action with signing out any retrieved elements.

#### endevor session definition options

- `--host` | `--hostname` (string)

  - Specifies the base host name.

- `--port` | `-p` (string)

  - Specifies the port number.

- `--protocol` | `--prot` (string)

  - Specifies the protocol used for connecting to Endevor Rest API

    Default value: https
    Allowed values: http, https

- `--user` | `--username` (string)

  - Specifies the user name.

- `--password` | `--pass` (string)

  - Specifies the user's password.

- `--reject-unauthorized` | `--ru` (boolean)

  - Specify this option to have the server certificate verified against the list of supplied CAs

- `--base-path` | `--bp` (string)

  - Specifies the base path used for connecting to Endevor Rest API

#### Profile Options

- `--endevor-profile` | `--endevor-p` (string)

  - The name of a (endevor) profile to load for this command execution.

- `--endevor-location-profile` | `--endevor-location-p` (string)

  - The name of a (endevor-location) profile to load for this command execution.

- `--base-profile` | `--base-p` (string)

  - The name of a (base) profile to load for this command execution.

#### Base Connection Options

- `--token-type` | `--tt` (string)

  - The type of token to get and use for the API. Omit this option to use the default token type, which is provided by 'zowe auth login'.

- `--token-value` | `--tv` (string)

  - The value of the token to pass to the API.

- `--cert-file` (local file path)

  - The file path to a certificate file to use for authentication.

    Note: The CLI does not support certificate files that require a password. For more information, search Troubleshooting PEM Certificates in Zowe Docs.

- `--cert-key-file` (local file path)

  - The file path to a certificate key file to use for authentication

#### Examples

- Merge element ELEMENT1 of type COBPGM from subsystem SUBFROM into the same element found in subsystem SUBTO (system, stage and env taken from current location profile):

  - `zowe endevor merge element ELEMENT1 --type COBPGM --subsystem SUBTO --merge-subsystem SUBFROM`

- Merge any elements that are currently out of sync with their next element version up the map (map location determined by current profile):

  - `zowe endevor merge element * --merge-out-of-sync`

- Report which elements are currently out of sync with their next element version up the map, but do not merge them yet (map location determined by current profile):

  - `zowe endevor merge element * --merge-out-of-sync --dry-run`

- Merge all elements from system SYSFROM, subsystem SUBFROM into matching elements in system SYSTO subsystem SUBTO (system, stage and env taken from current location profile):

  - `zowe endevor merge element * --system SYSTO --subsystem SUBTO --merge-system SYSFROM --merge-subsystem SUBFROM`

- Merge element ELEMENT1 of type COBPGM from subsystem SUBFROM into SUBTO, retrieving both elements using the provided ccid & comment, with signout, and overriding signout if necessary:

  - `zowe endevor merge element ELEMENT1 --type COBPGM --subsystem SUBTO --merge-subsystem SUBFROM --ccid MYCCID --comment 'my comment' --signout --overrride-signout`