AppCode 2019.3 Help

Merge files from the command line

You can use AppCode as a command line tool for merging files.

Most often you need to merge three versions of the same file: your local version, the version in the repository or in the upstream, and the base revision, which is the origin for the two diverged versions.

  • In the command line, run the merge command using the following syntax:

    <AppCode> merge path1 path2 path3 output

It is also possible to pass only three arguments to the merge command. In this case, the contents of the output will serve as the base revision.

  • In the command line, run the merge command using the following syntax:

    <AppCode> merge path1 path2 output

The selected files will be opened in the Merge dialog allowing you to accept or discard each change individually.

The command options are as follows:

Option

Description

<AppCode>

The name of the AppCode command-line launcher. By default, appcode.

path1

The path to the local copy of the file.

path2

The path to the repository version of the file.

path3

(optional) The path to the base revision for path1 and path2.

output

The path to the file to save the merge results in.

Example

Syntax
<AppCode> merge path1 path2 path3 output
Example
appcode merge ~/MyProject/Readme.md.bak ~/MyProject/Readme.md ~/Archive/Readme.md ~/NewProject/Readme.md
Last modified: 6 February 2020