Re: Git on Windows, CRLF issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Karlsson schrieb:
> Jakub Narebski:
> 
>> I think you can, by unsetting `crlf` attribute, i.e. putting the
>> following in .gitattributes:
>>
>>    * -crlf
> 
> Yeah, that does indeed seem to work, no matter how core.autocrlf is
> configured globally. I think this is the best way to go for the
> repositories I am working on (as they are very much DOS/Windows-only).
> 
> Does anyone know how to hack an existing repository so that I can add
> such a .gitattributes file to all commits? I've tried reading the
> git-filter-branch manual page a few times, but I am still confused by
> it.

Something like (untested, using bash):

X=$(echo "* -crlf" | git hash-object -w --stdin)
git filter-branch \
	--index-filter $'git-update-index --index-info <<< \
				"100644 $X\t.gitattributes"' \
	-- --all

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux