IntelliJ IDEA 13.1.0 Web Help

Suppose, you have two diverged branches, master and experimental. One day, you decide to integrate changes from one specific commit in experimental to branch_2. With IntelliJ IDEA, you can cherry pick between branches right from the Changes tool window.


Unlike the native git cherry-pick action, IntelliJ IDEA does not commit the selected changes to the other branch automatically but stores them in a new change list.

To cherry pick changes between two branches
  1. Switch to the target branch the changes will be integrated to.


    It is required that your working tree should be clean, that is, there should be no modifications from the HEAD commit.

  2. Open the Changes tool window and switch to the Log tab.
  3. From the Branch drop-down list on the toolbar, select the source branch from which you want to integrate the changes.


    The Commits area lists all the commits performed in the selected branch. To reduce the number of items in the list, specify the author of the required commit in the User drop-down list.

  4. From the Commits list, select the required commit. Use the commit information below, if necessary.
  5. Click the Cherry-pick button cherryPickButton.png on the toolbar. IntelliJ IDEA displays a dialog box that informs you that changes are going to be cherry-picked to the current branch. Click Continue to launch cherry picking. When cherry picking is completed, IntelliJ IDEA displays the corresponding information message.
  6. Switch to the Local tab where the cherry picked changes are grouped in a new change list. The name of this change list is the commit message of the commit the changes are cherry picked from.
  7. Commit the changes from the new change list.

See Also


External Links:

Version Control:

Web Resources: