Set SVN to ignore files and directories (folders)

In most projects you will always have files and directories that don't need to be version controlled. This may include some files generated by the compiler, *.obj, *.lst, or perhaps an output folder for executable programs. As soon as you commit your changes, TortoiseSVN will show unversioned files in the file list in the commit dialog. Of course you can turn off this display, but you may forget to add new source files.

 

The best way to avoid similar problems is to add the referenced file to the project's ignore list. This way they never show up in the commit dialog, while the real unversioned files are still listed.

 

1. Method 1

 

In Eclipse click the menu window --> Preferences --> Team --> Ignored Resources and

click the Add Pattern… button to add the files or directories you want to ignore.

 

2. Method 2

 

In the navigation view of Eclipse, select the file or directory that has not been added to version control, right-click --> Team --> Add to SVN:ignore

 

3. Method 3

 

In the Explorer, right-click on an unversioned file or directory, and select TortoiseSVN →Add to Ignore List from the popup menu. A submenu will appear that allows you to select only this file or all files with the same suffix.

If you want to remove one or more entries from the ignore list, right-click on those entries and select TortoiseSVN → Remove from ignore list.

 

4. Method 4

 

Another way to ignore files is to add them to the globalignore list. The biggest difference between them is that the global ignore list is a client-side feature. It applies to all (all) subversion projects. But it can only be used on pc client.

 

Subversion's ignore mode uses file matching, a technique originally used on Unix systems that uses the meta character as a wildcard. The following characters have special meanings:

 

  •  * matches any string, including the empty string (no characters)
  •  ? matches any single character
  •  [...] matches any single character within square brackets [], within which a pair of characters is separated by "-", matches any lexically (lexically) character between them. For example [AGm-p] matches any single A, G, m, n, o or p.

 

 

 

Pattern matching is case-sensitive, which can be problematic on Windows platforms. You can use pairs of characters to force case-ignoring. For example, to ignore the case of *.tmp, then you can use a pattern like *.[Tt][Mm][Pp] .

 

If you want an officially defined matching rule. You can find it in the IEEE specification PatternMatching Notation on shell command line languages .

 

Reprinted from: http://blog.csdn.net/hemingwang0902/article/details/6904205

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326563336&siteId=291194637