How to set SVN global ignores

There are some customizations that I make that pertains to my development computer only and because I work in a team environment I cannot commit in things that are customized towards my development environment. In order to do this, I do a global ignore on the file. Here’s how to do a global ignore. The subversion config file for Ubuntu 12.04 LTS or 12.10 is here:

[code language=”bash”]sudo nano /etc/subversion/config[/code]

There is a section that looks like this

[code language=”bash”][miscellany]

Set global-ignores to a set of whitespace-delimited globs

which Subversion will ignore in its ‘status’ output, and

while importing or adding files and directories.

‘ matches leading dots, e.g. ‘.rej’ matches ‘.foo.rej’.

global-ignores = .o *.lo *.la *.al .libs *.so *.so.[0-9] *.a *.pyc *.pyo

.rej *~ ## .#* .*.swp .DS_Store[/code]

You can uncomment that “global-ignores” part.

Some suggestions for .gitignore

This is more of a personal note. You may find it useful too.

Here’s how to ignore files and folders using Git. You can create a file “.gitignore” and place in the files and folders that you wish to ignore (separated with a line break).

In the file: “./.gitignore”

Here’s a list of standard things to do a .gitignore. It ignores the thumbnail files generated by Mac OSX and Windows. (I’m on Windows Vista.) You can place this on the top folder of your Git project:

[code lang=”ini”]nbproject
.DS_Store
Thumbs.db
Desktop.ini[/code]

“nbproject” is for NetBeans.

In the file: “./app/.gitignore”

Well, if you use CakePHP, you may want to add an additional .gitignore file in your CakePHP app directory:

[code lang=”ini”]tmp/**/*
config/database.php[/code]

I am open to suggestions what other files or folders are good to ignore but these are all I can recall. You can read more about gitignore at kernal.org.