PyCharm 2016.1 Help

Configuring Ignored Files

On this page:


Sometimes you may need to leave files of certain types unversioned. These can be VCS administration files, artifacts of utilities, backup copies, etc. You can create a global ignore list that will be stored in the workspace file and applied to all supported version control systems.

The files you want to ignore can be appointed explicitly by their names of through name patterns with wildcards. To ignore a directory, you need to specify the full path to it relative to the project root.

Use the Ignored Files settings page to list files that must be excluded from version control operations.

Note that once you've added a file to a version control system, ignoring it will have no effect. You need to remove it from your VCS first.

Defining a list of ignored files

To define a list of ignored files

  1. Open the Ignored Files settings page by doing one of the following: The Ignored Files dialog box opens.
  2. Click add (Alt+Insert) to create a new entry, or select an existing entry and click edit1 (Enter). The Ignore Unversioned Files dialog box opens.
  3. Explicitly specify the files/directories to be ignored or define file name patterns. Do one of the following:
    • Choose the Ignore specified file option and specify the file name relative to the project root, for example, my_folder/my_subfolder1/my_subfolder2/my_file. Type the name manually or click the Browse button browseButton and select the desired file in the Select File to Ignore dialog box.
    • Choose the Ignore all files under option and specify the directory whose contents should be ignored. Type the directory name relative to the project root, for example, my_folder/my_subfolder1/, or click Browse button browseButton and select the desired folder in the Select Directory to Ignore dialog box.

      The rule is applied recursively to all the subdirectories of the specified directory. If a directory has several subdirectories and you want only one of them ignored, specify the required directory explicitly, for example, my_folder/my_subfolder1/my_subfolder2/.

    • Select the Ignore all files matching option and type the pattern that defines the names of files to be ignored. The rule is applied to all the directories under the project root. Using wildcards in combination with slashes (/) to restrict the scope to a certain directory is not supported.

      Patterns that define files to ignore, make use of two wildcards.

  4. Create as many entries as you need and close the dialog box.


Two characters are used as the wildcards:

  • *: this character matches anything.
  • ?: this character matches a single character.

For example, *.iml will ignore all the files with the extension iml; *.?ml will ignore all the files with the extension ending with ml.

See Also

Last modified: 20 April 2016