PyCharm 2017.1 Help

Version Control

File | Settings | Version Control for Windows and Linux
PyCharm | Preferences | Version Control for macOS

The settings under this node allow configuring integration with different version control systems.

Common settings that are applied to the project files regardless of which version control system is used:

The settings for configuring integration with a specific version control system are located under the following nodes:

Specify which version control systems will be used for specific directories, or the entire project.

DirectoryThis field shows the path to project directories or the project root(s).

For projects with Git integration enabled, PyCharm scans project directories to check if there are Git repositories that are not controlled by the IDE. If such repositories are found, they are listed here under Unregistered roots and are marked grey. To add an unregistered root, select it in the list and click the Add button /help/img/idea/2017.1/new.png.

PyCharm also checks if registered roots are valid, i.e. that a Git repository exists at the specified path. If invalid repositories are detected, they are marked with red.

VCSSelect a version control system for the specified directory.

The list only displays the version control systems for which the corresponding plugins are enabled (SeeManaging Plugins).

/help/img/idea/2017.1/ellypsis.png Click this button to open the Version Control Configurations dialog and update the configuration settings for the selected VCS.
/help/img/idea/2017.1/new.png Click this button to add a directory mapping to the list. The Add VCS Directory Mapping dialog box opens where you can specify the required directory, select a VCS for it, and open the Version Control Configurations dialog box to configure the specified VCS, if necessary.
/help/img/idea/2017.1/edit1.pngClick this button to edit the selected directory mapping. The Edit VCS Directory Mapping dialog box opens where you can update the selected mapping and configure the specified VCS, if necessary.
/help/img/idea/2017.1/delete.pngClick this button to remove the selected directory mapping from the list.
Limit history toSelect this check box to specify the number of history rows. If this check box is selected, the text box of history depth, and the spin box become enabled.
Show directories with changed descendantsIf this check box is selected, the directories that contain changes, are color-marked.

The colors are configurable in the Colors and Fonts pages of the Editor settings (File Status - Have immediate changed children, Have changed descendants).

Shelve base revisions of files under distributed version control systems. This option is relevant only for Git and Mercurial. Select this check box to automatically shelve base revisions of files that are under Git or Mercurial version control.

By default, PyCharm always "remembers" the last commit hash. However, this information is not sufficient if the history has been changed since the last commit as a result of running the rebase operation. In this case, having a copy of the base revision may help.

Show changed in last <number> daysSelect this check box to have color indication of file status applied during stacktrace analysis and debugging. The names of the files that have been changed within a certain period will be highlighted accordingly.

Specify the number of days.

Filter Update Project information by scopeIf this option is enabled and a scope is selected, the files that belong to this scope will be marked in bold in the Update Project Info tab of the Version Control Tool Window. If you click the Filter button /help/img/idea/2017.1/filter.png in the toolbar in the Update Project Info tab, the files will be filtered by scope, i.e. only the files that belong to the selected scope will be displayed.

Click the Manage Scopes link to open the Scopes settings dialog and configure a scope.

Commit message right margin (columns)In this field, specify the number of symbols that can fit into the right margin of the Commit Changes dialog.

Select the Wrap when typing reaches right margin option if you want the text to be transferred to the next line when the maximum number of characters has been reached.

Show unversioned files in Commit dialogSelect this option to see newly added files that have not been added to version control yet under the Unversioned Files node in the Commit Changes dialog.
Check commit message spellingSelect this check box if you want to automatically check spelling of your commit messages.

See Also

Last modified: 26 July 2017