IntelliJ IDEA 2016.3 Help

Resetting Branch Head to a Selected Commit

IntelliJ IDEA allows you to reset the current Git branch head to a selected commit and update the working tree and the index.

To reset the current branch head to a selected commit

  1. In the main menu navigate to View | Tool Windows | Changes.
  2. In the Version Control tool window switch to the Log tab.
  3. Select a commit that you want to reset the current branch head to, and right-click this commit. Select Reset Current Branch to Here from the popup menu.
  4. In the Git Reset dialog that opens, select the mode for updating the working tree and the index. The following options are available:
    • Soft: The modified files will not be changed, and the differences will be staged for commit.
    • Mixed: The modified files will not be changed, and the differences will be unstaged. This mode is used by default and is identical to the git reset command.
    • Hard: The modified files will be reverted to the selected commit, and all uncommited changes will be lost.
    • Keep: The modified files will be reverted to the selected commit, but local changes will be preserved.

See Also

Last modified: 7 December 2016