Ignoring resources from version control

When synchronizing resources, it is possible that there are some resources that you do not want to commit to the repository. There are two ignore facilities provided, allowing you to specify what resources should be excluded from update and commit operations.

The first is a global ignore facility, provided by the Workbench. The second is the VCS ignore facility, which reads the contents of a special file e.g .gitignore to determine what to ignore.

Why ignore files when synchronizing?

There are many files that a user may not want to commit to the repository. For example, external editors may create temporary files in your project. Compilation of .java files creates .class files, and likewise many build operations result in binary files. These files, when taken together, may be quite large. In addition, they may be re-generated whenever a build is performed, resulting in many outgoing changes. Typically these are not files that one wants to share with other members of a team or persist in the repository.

Global ignore facility

A global ignore facility is provided by the Workbench via the command link Team preference page. There is a list of file patterns against which resources will be matched before they are considered as version control candidates. These patterns may contain the wildcard characters "*" and "?". "*" represents any sequence of zero or more characters. "?" represents any one character. For example, you can specify a pattern of "*~", which would match any temporary files that end with "~". Any file or directory that matches any one of the patterns will be ignored during update or commit operations. When you specify a file pattern to ignore, you can temporarily disable ignoring the file pattern by deselecting it from the list; you do not have to remove the specified file pattern from the list.

The patterns in the global ignore facility are matched against resource names during a synchronize operation. It is important to note that the path leading up to the resource name is not included in the matching. For example, for the file "/path/to/file.txt", only the string "file.txt" is matched against the patterns. This facility is not intended for specifying fully-qualified path names but for specifying globally-applicable patterns.