RubyMine 2016.2 Help

Excluding Files and Folders from Upload/Download

On this page:

Basics

Suppressing uploading, downloading, and synchronization for files or folders with sources ensures that the sources are protected against accidental update. When applied to non-sources, it saves system resources because huge amounts of media, caches, or temporal files are no longer copied hither and thither.

You may need to suppress upload/download in the following cases:

  1. You are going to work with externally created and uploaded source code. To process these remote sources in RubyMine, you have to download them and arrange them in a project. However, there are some sources that you should not update at all. On the other hand, the folders on the remote host also may contain huge amounts of media, caches, temporal files, that you actually do not need in your work.
  2. You have already downloaded the data from the server and arranged them in a RubyMine project. However, for this or that reason, you need to have some files or folders on the server protected against upload/download, for example, to prevent accidental overwriting.
  3. The local copy of an application contains both source code and other data that you do not need to upload. Besides, you want to protect some sources against overwriting by mistake. In this case, you can suppress upload/download for all files and folders that should not be uploaded.

There are two ways to exclude folders from upload/download:

  • Explicitly, by marking the corresponding paths as excluded in the Remote Host tool window or in the Excluded Paths tab of the Deployment dialog box.
    1. The names of all the not-excluded folders and files are displayed on green background. The names of excluded items are displayed without background.
    2. In the Remote Host tool window, you can exclude both entire folders and specific files.
  • By name, that is, by specifying patterns that determine the names of files and folders to be excluded in the Exclude Items by Name text box of the Options dialog box.

Separate files can be protected against upload/download only through excluding them by name.

Excluding a folder on server from upload/download after project creation

  1. Choose the required folder right in the Remote Host tool window:
    1. On the main menu, choose Tools | Deployment | Browse Remote Host or View | Tool Windows | Remote Host .
    2. In the Remote Host tool window that opens, select the relevant server configuration from the drop-down box.
    3. Select the folder to exclude and choose Exclude Path on the context menu of the selection.
  2. Add the required folder to the list of excluded paths:
    1. Open the Deployment dialog box by doing one of the following:
      • Choose Tools | Deployment | Configuration on the main menu.
      • Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or RubyMine | Preferences for OS X, and click Deployment under Build, Execution, Deployment.
    2. In the Deployment dialog box, switch to the Excluded Paths tab. The tab shows list of previously excluded local and remote folders.
    3. Click the Add deployment path button. An empty line is added to the list.
    4. Click the Browse button browseButton.png. The Select remote excluded path dialog box that opens shows the data on the host accessed through the selected server configuration. Select the required folder.
    5. When you OK, you return to the Excluded Paths tab, where the selected remote folder is added to the list.

Excluding a local folder from upload/download

  1. Open the Deployment dialog box by doing one of the following:
    • Choose Tools | Deployment | Configuration on the main menu.
    • Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or RubyMine | Preferences for OS X, and click Deployment under Build, Execution, Deployment.
  2. In the Deployment dialog box, switch to the Excluded Paths tab. The tab shows list of previously excluded local and remote folders.
  3. Click the Add local path button. In the empty line that is added to the list, specify the location of the folder to be protected against upload/download. Type the path manually or click the Browse button browseButton.png and choose the required folder in the dialog that opens.

Excluding files and folders from upload/download by name

  1. Open the Options dialog box by doing one of the following:
    • On the main menu, choose Tools | Deployment | Options.
    • Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or RubyMine | Preferences for OS X. Expand the Build, Execution, Deployment node, and then click Options under Deployment.
  2. In the Options dialog box that opens, specify the patterns that define the names of these files and folders in the Exclude items by name text box. Use semicolons as delimiters. Wildcards are welcome.

    The exclusion is applied recursively. This means that if a matching folder has subfolders, the contents of these subfolders are not deployed either.

Removing the exclusion mark

To return a file or folder to upload/download, select it and choose Remove Path from Excluded on the context menu of the selection. Returning a folder to upload/download automatically affects all its subfolders and files.

See Also

Last modified: 1 September 2016