On Thu, May 15, 2014 at 12:21:35PM -0700, Sander Voerman wrote:
> 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.

That ought to be rather easy to test with an experiment.  Please let
us know what you find, I'm curious too :)


Magnus Therning                      OpenPGP: 0xAB4DFBA4 
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe               http://therning.org/magnus

The results point out the fragility of programmer expertise: advanced
programmers have strong expectations about what programs should look like,
and when those expectations are violated--in seemingly innocuous
ways--their performance drops drastically.
     -- Elliot Soloway and Kate Ehrlich

Attachment: pgpPcMZe234Rq.pgp
Description: PGP signature

Reply via email to