title: How do I ignore specific files in a Git repository?
body: <p>i'm using github to host a git repository and i need to clone that repository in some machines (those machines are not for making changes into the code) they are only used to save a copy of the code of a software.</p>
  
  <p>I use the following command line to clone the remote repository into local machines:</p>
  
  <pre><code>git clone -b master git://github.com/jquery/jquery.git jquerylocal
  </code></pre>
  
  <p>The problem comes when i need to synchronize (get the changes of files and new files added) the local folder named <code>jquerylocal</code> with the latest version, because my machine add files named <code>.DS_Store</code> and gives me the following error:</p>
  
  <pre><code>error: Your local changes to the following files would be overwritten by merge:
      .DS_Store
  </code></pre>
  
  <p>I would like to say git to ignore all files that i created in my local directorey and replace with the new ones and make new changes in existing files.</p>
  
  <p>I'd also like to know how to say git to ignore some folders and files to be syncronized.</p>
  
  <p>Thanks a lot.</p>