AppCode 2016.1 Help

Rebasing a Branch to a Specific Commit

Suppose you have branch1 based on master. While you were working
in branch1, some updates were committed to master. For some reason, you do not want to rebase
branch1 to the current HEAD of master, but want to rebase it to commit CommitB.
Moreover, you do not want to apply commit 1, but want to start with commit 2.

The diagram below illustrates the described rebase operation.

Transplanting a branch to a branch different from its base is also supported. Suppose your branch2 is based on branch1,
which, in its turn, is based on master.

The diagram below illustrates rebasing branch2 to a specific commit in master.

Define the contents of the Onto and From drop-down lists. By default, tags and remote branches are not available from them.
To expand the lists with tags or remote branches, select the Show Tags and Show Remote Branches check boxes respectively.

From the Onto drop-down list, select the required branch and specify the commit to move the base to.
Type the desired commit hash or use an expression, for example, of the following structure:

<branch>~<number of commits backwards between the latest commit (HEAD) and the required commit>

Click the Validate button and view view which files are affected in the specified commit
in the Paths affected in commit... dialog box that opens.

From the From drop-down list, select the current branch and specify the commit,
starting from which you want to apply commits on top of the new base.
Type the desired commit hash or use an expression, for example, of the following structure:

<branch>~<number of commits backwards between the latest commit (HEAD) and the required commit>

To perform all merges manually, select the Do not use merging strategies check box.

To have AppCode apply one of the available merging methods, select the relevant option from the Merge Strategy drop-down list.
See the Rebase Branches dialog box reference for description of available options.

Click the Rebase button and proceed depending on the chosen rebase mode: