----- Original Message ----- 
  From: Sander Voerman 
  To: git-users@googlegroups.com 
  Sent: Thursday, May 15, 2014 8:21 PM
  Subject: [git-users] Which version of .gitattributes does git checkout use?


  Hi all,

  My question is this: if the .gitattributes file differs between branches, 
which one will git checkout use if you switch from branch1 to branch2? Will it 
use the one in the working directory before checkout, i.e., the one that was on 
branch1? In that case, if the .gitattributes file on branch2 contains rules 
specific to files on branch2, git will fail to apply those rules. Or does git 
read the .gitattributes file directly from the to-be-checked-out commit in the 
repository, so that it can always apply that .gitattributes file to a commit 
that it is part of? Same question for .gitignore.

  Regards,
  Sander


  -- 

The man page suggests what happens under checkout....
During checkout process, .gitattributes in the index is used and then the file 
in the working tree is used as a fall-back.

Philip

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to