h1

Ignoring files with git

November 2, 2010

Git is a great version control system whose greatest advantage is not filling every directory in your project with needless additional files. It just stores things in a top level directory called .git. If you want to remove a project from version control, just delete the .git directory, easy!

To ignore directories in a project and not version them with the rest of the project, create a top level file at the same level as the .git directory called .gitignore and list each folder you want to be ignored in here. You can also ignore file types using the *.file pattern matching.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: