git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Gitattributes file is not respected when switching between branches
@ 2016-09-12 12:55 Виталий Ищенко
  2016-09-12 19:35 ` Torsten Bögershausen
  0 siblings, 1 reply; 5+ messages in thread
From: Виталий Ищенко @ 2016-09-12 12:55 UTC (permalink / raw)
  To: git

Good day

I faced following issue with gitattributes file (at least eol setting)
when was trying to force `lf` mode on windows.

We have 2 branches: master & dev. With master set as HEAD in repository

I've added `.gitattributes` with following content to `dev` branch

```
* text eol=lf
```

Now when you clone this repo on other machine and checkout dev branch,
eol setting is not respected.
As a workaround you can rm all files except .git folder and do hard reset.

Issue is reproducible on windows & unix versions. Test repo can be
found on github
https://github.com/betalb/gitattributes-issue

master branch - one file without gitattributes
feature-branch - .gitattributes added with eol=lf
unix-feature-branch - .gitattributes added with eol=crlf

Thanks,
Vitalii

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-18 19:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12 12:55 Gitattributes file is not respected when switching between branches Виталий Ищенко
2016-09-12 19:35 ` Torsten Bögershausen
2016-09-12 19:42   ` Torsten Bögershausen
2016-09-16  6:51     ` Виталий Ищенко
2016-09-18 19:31       ` Torsten Bögershausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).