Posted By

aleprieto on 03/20/10



Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Git ignore global

 / Published in: Bash

Here's how to set-up globally a set of excludes when using GIT, in this case setting up GIT to ignore .DS_Store files on a Mac.

First add a common ignore file to the GIT configuration, in this case stored in the users home directory called .gitignore

Next add the exclude line for .DS_Store to the .gitignore file either with your favourite editor or simply with this command which will create it if it doesn't already exist as well.

  1. git config --global core.excludesfile ~/.gitignore
  2. echo .DS_Store >> ~/.gitignore

Report this snippet  


RSS Icon Subscribe to comments
Posted By: Vordreller on March 20, 2010

Can be used for Thumbs.db on Windows too.

You need to login to post a comment.