title: Does a gitignore prevent git from pulling files?
body: <p>There are several descriptions for what a gitignore file achieves:</p>
  <blockquote>
  <p>gitignore - Specifies intentionally untracked files to ignore - <a href="https://git-scm.com/docs/gitignore" rel="nofollow noreferrer">git</a></p>
  <p>From time to time, there are files you don't want Git to check in to GitHub. There are a few ways to tell Git which files to ignore. - <a href="https://help.github.com/articles/ignoring-files/" rel="nofollow noreferrer">github</a></p>
  </blockquote>
  <p>If files are untracked and are added to a gitignore file they will not be pushed to the server if I commit my repository.</p>
  <p>What happens if I have files in the repository on github and they are added in the .gitignore. Will people receive those files if they clone the repository?</p>
  <ol>
  <li><p>I would like to provide a default credentials file which shall be cloned into peoples repository but not pushed back if altered by said people.</p>
  </li>
  <li><p>I would like to provide a doc folder in the repository which should not be imported into eclipse if cloned.</p>
  </li>
  </ol>
  <p>Is git able to handle these two situations, and how would this be correctly set up?</p>