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:

nbproject
.DS_Store
Thumbs.db
Desktop.ini

“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:

tmp/**/*
config/database.php

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.

One thought on “Some suggestions for .gitignore”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>