* turn off "LF will be replaced by CRLF" thingy
@ 2008-12-29 15:38 Zorba
2008-12-29 15:55 ` Zorba
2008-12-29 15:58 ` Dmitry Potapov
0 siblings, 2 replies; 7+ messages in thread
From: Zorba @ 2008-12-29 15:38 UTC (permalink / raw)
To: git
Dear All,
I was just in the process of creating our first live version on git (5k+
files), when I noticed this in the output of
$ git add .
being "Warning: LF will be replaced by CRLF in <filename>"
about 500 times !!
I'd rather not let git change any files, many of which are PHP that run on
Apache
I think I remember reading that this is a config option that gets swithced
on by default on windows (which we are running git on)
how do I switch it off ?
thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: turn off "LF will be replaced by CRLF" thingy
2008-12-29 15:38 turn off "LF will be replaced by CRLF" thingy Zorba
@ 2008-12-29 15:55 ` Zorba
2008-12-29 15:58 ` Dmitry Potapov
1 sibling, 0 replies; 7+ messages in thread
From: Zorba @ 2008-12-29 15:55 UTC (permalink / raw)
To: git
OK, lets be brave and see if I can work this out:
Tutorial says:
"The git configuration file contains a number of variables that affect the
git command's behavior. .git/config file for each repository is used to
store the information for that repository, and $HOME/.gitconfig is used to
store per user information to give fallback values for .git/config file. The
file /etc/gitconfig can be used to store system-wide defaults."
.git/config
======
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
$ echo $HOME
gives:
c\docs and settings\<my name>
$HOME\.gitconfig
=============
[gui]
recentrepo = C:/Documents and Settings/conorr/Desktop/TEMP
recentrepo = C:/Documents and Settings/conorr/Desktop/TEMP/swproj
[user]
email = cr@altmore.co.uk
name = Conor Rafferty
/etc/gitconfig (under Git installation)
===============================
[core]
symlinks = false
autocrlf = true
[color]
diff = auto
[pack]
packSizeLimit = 2g
[help]
format = html
Then tuturial -> the two settings are
core.autocrlf
and
core.safecrlf
So I should set the autocrlf=false in the etc/config file I'm guessing?
lets try that
"Zorba" <cr@altmore.co.uk> wrote in message
news:gjaqta$tg7$4@ger.gmane.org...
> Dear All,
>
> I was just in the process of creating our first live version on git (5k+
> files), when I noticed this in the output of
>
> $ git add .
>
> being "Warning: LF will be replaced by CRLF in <filename>"
> about 500 times !!
>
> I'd rather not let git change any files, many of which are PHP that run on
> Apache
> I think I remember reading that this is a config option that gets swithced
> on by default on windows (which we are running git on)
>
> how do I switch it off ?
>
> thanks
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: turn off "LF will be replaced by CRLF" thingy
2008-12-29 15:38 turn off "LF will be replaced by CRLF" thingy Zorba
2008-12-29 15:55 ` Zorba
@ 2008-12-29 15:58 ` Dmitry Potapov
2008-12-29 16:18 ` Zorba
1 sibling, 1 reply; 7+ messages in thread
From: Dmitry Potapov @ 2008-12-29 15:58 UTC (permalink / raw)
To: Zorba; +Cc: git
> I'd rather not let git change any files, many of which are PHP that run on
> Apache
> I think I remember reading that this is a config option that gets swithced
> on by default on windows (which we are running git on)
>
> how do I switch it off ?
git config core.autocrlf false
or if you want to ensure that all your text files have only LF then
git config core.autocrlf input
or if you want to disable conversion for some specific files then you can
use 'crlf' attribute. See 'gitattributes' for more information.
http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: turn off "LF will be replaced by CRLF" thingy
2008-12-29 15:58 ` Dmitry Potapov
@ 2008-12-29 16:18 ` Zorba
2008-12-29 17:29 ` david
0 siblings, 1 reply; 7+ messages in thread
From: Zorba @ 2008-12-29 16:18 UTC (permalink / raw)
To: git
Thanks Dmitry,
So I have two options to do this - edit the files direct or issue a command,
thank you !
Now, my next problem is taking all my changes ($ git add . -> puts 5k files
into index, with LF in place of CRLF) out of the index.
Because I haven't committed anything in this repo yet...
$ git reset --hard
....falls over, as it has no HEAD to reset to
I think I read how to do this in a tutorial somewhere, maybe with
git-checkout, but I'm searching and can't find it.
Any kind soul can point me in the right direction ?
thanks !
"Dmitry Potapov" <dpotapov@gmail.com> wrote in message
news:37fcd2780812290758q3ef989c0w5156da3098d06068@mail.gmail.com...
>> I'd rather not let git change any files, many of which are PHP that run
>> on
>> Apache
>> I think I remember reading that this is a config option that gets
>> swithced
>> on by default on windows (which we are running git on)
>>
>> how do I switch it off ?
>
> git config core.autocrlf false
>
> or if you want to ensure that all your text files have only LF then
>
> git config core.autocrlf input
>
> or if you want to disable conversion for some specific files then you can
> use 'crlf' attribute. See 'gitattributes' for more information.
> http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
>
> Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: turn off "LF will be replaced by CRLF" thingy
2008-12-29 16:18 ` Zorba
@ 2008-12-29 17:29 ` david
2008-12-30 0:48 ` Zorba
0 siblings, 1 reply; 7+ messages in thread
From: david @ 2008-12-29 17:29 UTC (permalink / raw)
To: Zorba; +Cc: git
On Mon, 29 Dec 2008, Zorba wrote:
> Thanks Dmitry,
>
> So I have two options to do this - edit the files direct or issue a command,
> thank you !
>
> Now, my next problem is taking all my changes ($ git add . -> puts 5k files
> into index, with LF in place of CRLF) out of the index.
>
> Because I haven't committed anything in this repo yet...
I think if you just do a git add . again it will put the files into the
index without doing the conversion.
David Lang
> $ git reset --hard
>
> ....falls over, as it has no HEAD to reset to
>
> I think I read how to do this in a tutorial somewhere, maybe with
> git-checkout, but I'm searching and can't find it.
> Any kind soul can point me in the right direction ?
>
> thanks !
> "Dmitry Potapov" <dpotapov@gmail.com> wrote in message
> news:37fcd2780812290758q3ef989c0w5156da3098d06068@mail.gmail.com...
>>> I'd rather not let git change any files, many of which are PHP that run
>>> on
>>> Apache
>>> I think I remember reading that this is a config option that gets
>>> swithced
>>> on by default on windows (which we are running git on)
>>>
>>> how do I switch it off ?
>>
>> git config core.autocrlf false
>>
>> or if you want to ensure that all your text files have only LF then
>>
>> git config core.autocrlf input
>>
>> or if you want to disable conversion for some specific files then you can
>> use 'crlf' attribute. See 'gitattributes' for more information.
>> http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
>>
>> Dmitry
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: turn off "LF will be replaced by CRLF" thingy
2008-12-29 17:29 ` david
@ 2008-12-30 0:48 ` Zorba
2008-12-30 2:13 ` Boyd Stephen Smith Jr.
0 siblings, 1 reply; 7+ messages in thread
From: Zorba @ 2008-12-30 0:48 UTC (permalink / raw)
To: git
Hi David & thanks for helping me out,
So I tried again to do
$ git add .
this time no warnings about CRLF / LF, in fact no output, so not sure if it
did anything (though took some time to process)
$ git status
Shows all the files in the index ok, but I don't know if it was the first
git add or the second (post CRLF=false config change) that put them there
....
I'd like to be certain, as 500 out of 5000 files could just get changed here
!
I know I could just delete everything in .git dir, and git init again
But I'm after the intelligent way to do this :-(
<david@lang.hm> wrote in message
news:alpine.DEB.1.10.0812290928370.15026@asgard.lang.hm...
> On Mon, 29 Dec 2008, Zorba wrote:
>
>> Thanks Dmitry,
>>
>> So I have two options to do this - edit the files direct or issue a
>> command,
>> thank you !
>>
>> Now, my next problem is taking all my changes ($ git add . -> puts 5k
>> files
>> into index, with LF in place of CRLF) out of the index.
>>
>> Because I haven't committed anything in this repo yet...
>
> I think if you just do a git add . again it will put the files into the
> index without doing the conversion.
>
> David Lang
>
>> $ git reset --hard
>>
>> ....falls over, as it has no HEAD to reset to
>>
>> I think I read how to do this in a tutorial somewhere, maybe with
>> git-checkout, but I'm searching and can't find it.
>> Any kind soul can point me in the right direction ?
>>
>> thanks !
>> "Dmitry Potapov" <dpotapov@gmail.com> wrote in message
>> news:37fcd2780812290758q3ef989c0w5156da3098d06068@mail.gmail.com...
>>>> I'd rather not let git change any files, many of which are PHP that run
>>>> on
>>>> Apache
>>>> I think I remember reading that this is a config option that gets
>>>> swithced
>>>> on by default on windows (which we are running git on)
>>>>
>>>> how do I switch it off ?
>>>
>>> git config core.autocrlf false
>>>
>>> or if you want to ensure that all your text files have only LF then
>>>
>>> git config core.autocrlf input
>>>
>>> or if you want to disable conversion for some specific files then you
>>> can
>>> use 'crlf' attribute. See 'gitattributes' for more information.
>>> http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
>>>
>>> Dmitry
>>
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe git" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-12-30 2:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-29 15:38 turn off "LF will be replaced by CRLF" thingy Zorba
2008-12-29 15:55 ` Zorba
2008-12-29 15:58 ` Dmitry Potapov
2008-12-29 16:18 ` Zorba
2008-12-29 17:29 ` david
2008-12-30 0:48 ` Zorba
2008-12-30 2:13 ` Boyd Stephen Smith Jr.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.