PhpStorm 2017.1 Help

Rebase Branches Dialog

VCS | Git | Rebase


Use this dialog box to specify the branch to rebase, the new base, the rebasing mode, and configure the rebasing procedure.

ItemDescription
Git RootFrom this drop-down list, select the path to the local repository in which you want to rebase a branch.
BranchFrom this drop-down list, select the branch to rebase.

By default, the current working branch is selected. If you specify another branch, it will be automatically checked out first.

InteractiveSelect this check box to view and possibly edit a list of commits to be rebased.
Preserve MergesSelect this check box to have the possibility to recreate merges instead of ignoring them. The check box is available only when the Interactive check box is selected.
OntoUse this drop-down list to specify the new base for the selected branch. To specify the required commit, type its 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>.
Refer to the Git commit naming conventions for details.

If no commit is specified, the HEAD of the selected branch is used as the new base.

ValidateClick this button to check that the commit specified in the Onto field exists and view which files were affected in it.
FromUse this drop-down list to specify the commit starting from which you want to apply the branch to the new base. Type the required 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>.
Refer to the Git commit naming conventions for details.

To apply the entire branch, leave the field empty.

ValidateClick this button to check that the commit specified in the From field exists and view which files were affected in it.
Show TagsSelect this check box to have tagged commits included in the Onto and From drop-down lists.
Show Remote BranchesSelect this check box to have branches in the remote repository included in the Onto drop-down list.
Merge StrategyFrom this drop-down list, select the merge strategy. The available options are:
  • Default
  • Resolve - select this option if you need to resolve two HEADs, one of which is the current branch and the other HEAD is the branch from which you pulled changes. When this option is selected, the 3-way merge algorithm is applied.
  • Recursive - the default merge strategy for pulling one branch. Select this option if you need to resolve two HEADs by applying the 3-way merge algorithm and there are more than one common ancestor that can be used for 3-way merge.
  • Octopus - the default merge strategy for pulling more than one branch.

    Merges that require resolving conflicts manually are not performed.

  • Ours - select this option if you need to supersede old development history of side branches. By applying this strategy any number of HEADs can be resolved but the result of the merge is always the HEAD of the current branch.
  • Subtree - a modified recursive strategy.
Do not use merge strategiesWhen this check box is selected, no merge strategy is applied during rebase.
RebaseClick this button to initiate rebasing according to the defined settings.

See Also

Last modified: 19 July 2017