title: gitattributes gets ignored on checkout
body: <p>We recently switched from svn to git in my company, therefore the overall know-how is still pretty low.</p>
  
  <p>We decided to set core.autocrlf=true on every machine and to use ".gitattributes" files for "finetuning" purposes.</p>
  
  <p>My Main Focus is an Integration-Project with apache-camel to transforms files from "a" to "b". As a lot of endpoints are different i need to ensure encoding, line endings etc. In my Tests with apache camel i take a static File from my test-resources, transform it and compare the output with another static file (basically the expected output) in my test-resources.</p>
  
  <p>This used to work perfectly until we introduced "core.autocrlf=true". Since then the tests seem to complete successfully on jenkins, but when i run them locally a lot of them fail. (I freshly cloned the Repository after "core.autocrlf=true" introduction). 
  I searched for 1 of the expected output-files. If i check the line endings on my machine (win 10) they are "crlf". If i check the line endings of the file from the Repository they are "lf". This conversion was to be expected with core.autocrlf=true.</p>
  
  <p>However i tried adding a ".gitattributes" file. With these two Specifications:</p>
  
  <pre><code>* text=auto
  *.xml binary
  </code></pre>
  
  <p>I just used "*.xml" as for easier testing if it works. Basically what i need is, that all of my files under test-resources should be ignored. But with the above ".gitattributes" file, i still get the testfile with crlf on my machine, even if i freshly clone the whole repo and do "git checkout branchname". It is the same behavior if i do </p>
  
  <pre><code>*.xml text eol=lf 
  </code></pre>
  
  <p>or </p>
  
  <pre><code>*.xml -text" etc.
  </code></pre>
  
  <p>From my Understanding what i read so far is that if i specify a path or a filetype as "binary" git should not do any conversion at all if i do git checkout, git commit or git whatever.</p>
  
  <p>Did i misunderstand something, or am i just doing something wrong, or is git not doing as it should?</p>