Re: Git on Windows, CRLF issues
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Apr 21, 2008, 21:51 UTC
- Message-ID
- <m3bq42ri56.fsf@localhost.localdomain>
- In-Reply-To
- <alpine.DEB.1.00.0804212145570.21181@perkele.intern.softwolves.pp.se>
Peter Karlsson <peter@softwolves.pp.se> writes:
Show 12 quoted lines
> I have began moving old repositories for Windows-based software to > Git. Since the tool I am moving from stores everything with CRLF line > endings and have RCS-like keyword expansion, I'm treating it all as > binary data when exporting to Git, i.e I have CRLF in the checked-in > data (and I do want that, since this is Windows-only sources). > > Now the latests msysgit comes along and (finally!) sets core.autocrlf > to true by default. > > How do I handle this without having everyone breaking check-ins? I > can't require everyone to do unset core.autocrlf globally. Can I do > that with gitattributes?
I think you can, by unsetting `crlf` attribute, i.e. putting the following in .gitattributes:
* -crlf
See gitattributes(5):
`crlf` ^^^^^^
This attribute controls the line-ending convention.
[...]
Unset::
Unsetting the `crlf` attribute on a path is meant to
mark the path as a "binary" file. The path never goes
through line endings conversion upon checkin/checkout.Not tested!
-- Jakub Narebski Poland ShadeHawk on #git