IntelliJ IDEA 13.1 Web Help

In this topic:

To merge a branch
  1. Invoke the Branches menu as described in the section Accessing Git Branches Popup Menu.
  2. On the pop-up list that shows all available local and remote branches, click the desired one, and choose Merge on the submenu.
  • The selected branch is merged into the branch that is currently checked out.
  • If there are merge conflicts, you can resolve them in the corresponding dialog box.
  • If the local changes would be overwritten by merge, IntelliJ IDEA suggests to perform smart merge (similar to smart checkout).
To delete a branch
  1. Invoke the Branches menu as described in the section Accessing Git Branches Popup Menu.
  2. On the pop-up list that shows all available local and remote branches, click the desired one, and choose Delete on the submenu. The subsequent behavior depends on the presence of unmerged commits.
    • If there are no unmerged commits, the selected branch is deleted.
    • If some of the commits have not yet been merged into the selected branch, the dialog box shows up with the list of unmerged changes, and list of branches where the one to be deleted has been already merged into. This information helps you decide whether the selected branch should be deleted.

      git_delete_branch

  3. If you are sure you want to delete a branch, click Delete, and confirm your decision.
To compare branches
  1. Invoke the Branches menu as described in the section Accessing Git Branches Popup Menu.
  2. On the pop-up list that shows all available local and remote branches, click the desired one, and choose Compare on the submenu. IntelliJ IDEA compares the branch that is currently checked out, with the selected branch.
  3. In the comparing branches dialog box, explore differences in two tabs:
    • Log: this tab lists the commits that exist in the current branch, and are missing in the selected branch, and vice versa.
    • Diff: this tab shows differences between files existing in both branches. Use Show Diff command on the context menu of a file to explore differences between branches.

See Also

Concepts:

Procedures:

Reference:

Web Resources: