IntelliJ IDEA 14.1.0 Help

Working with VCS (Git, Mercurial, Subversion, Perforce)

In this topic:

Configuring vcs roots

When you open a project located under a VCS root, IntelliJ IDEA automatically detects it and suggests adding this root to the project settings. To change version control-related project settings (or manually add a VCS root), go to Settings | Version Control:

migration_guide_vcs_settings

IntelliJ IDEA works perfectly with multi-repository projects. Just map your project directories to VCS, and the IDE will take care of the rest. For Git and Mercurial, the IDE will even offer you synchronized branch control, so that you can perform branch operations on multiple repositories simultaneously (for more details, see Git Branches in Multirooted Projects).

Editing vcs settings

Every VCS may require specific settings, for example, Path to Git executable, GitHub/Perforce credentials, etc.:

migration_guide_git_settings

Once you've configured the VCS settings, you'll see the Version Control tool window. You can invoke it any time by pressing Alt+9.

Checking projects out

To check out a project from a VCS, click Checkout from Version Control on the Welcome Screen, or in the the main VCS menu.

Working with local changes

The Local Changes tab of the Version Control tool window shows your local changes: both staged and unstaged. To simplify managing changes, all changes are organized into changelists. Any changes made to the source files are automatically included into the active changelist. You can create new changelists, delete existing ones (except for the Default changelist), and move files between changelists.

migration_guide_changes

To configure ignored files, go to Settings | Version Control, or use the corresponding button in the Version Control tool window.

migration_guide_ignored_files

Working with history

The Log tab of the Version Control tool window lets you see and search through the history of commits. You can sort and filter commits by the repository, branch, user, date, folder, or even a phrase in the description. You can find a particular commit, or just browse through the history and the branch tree:

migration_guide_log

Working with branches

IntelliJ IDEA lets you create, switch, merge, compare and delete branches. For these operations, either use Branches from the main or context VCS menu, or the VCS operations popup (you can invoke it by pressing Alt+Back Quote, or the widget on the right of the status bar:

migration_guide_vcs_popup

All VCS operations are available from the VCS main menu:

ActionShortcut
Version Control tool window Alt+9
VCS operations popup Alt+Back Quote
Commit changes Ctrl+K
Update project Ctrl+T
Push commits Ctrl+Shift+K

See Also

Last modified: 14 July 2015