line endings

3 views
Skip to first unread message

Radu Grigore

unread,
Sep 16, 2010, 7:09:29 AM9/16/10
to jstar-users
Please run
git config --global core.autocrlf true
especially if you're on Windows.

See
http://help.github.com/dealing-with-lineendings/
if you are curious why.

Radu Grigore

unread,
Sep 20, 2010, 5:29:47 AM9/20/10
to jstar-users
Actually, I should have read the docs more carefully.

On Windows, run:
git config --global core.autocrlf true

On UNIX-like system, run
git config --global core.autocrlf input

Matthew Parkinson

unread,
Sep 22, 2010, 6:31:37 AM9/22/10
to jstar...@googlegroups.com
I am getting confused when I check stuff out, without doing anything
it is telling me I have modified files. I think it is related to
this.

In particular, it is telling me I have modified

playground/traditional/*

straightafter doing

git clone g...@github.com:septract/jstar.git jstar

So I haven't done anything. Can someone explain?

Matt

Stephan van Staden

unread,
Sep 22, 2010, 6:50:22 AM9/22/10
to jstar...@googlegroups.com
Hmm, if all else fails you can simply delete the directory.

Matthew Parkinson

unread,
Sep 22, 2010, 6:54:57 AM9/22/10
to jstar...@googlegroups.com
Then it tells me I have pending changes of removal. That is what I
would have done with SVN.

Matt

On 22 September 2010 11:50, Stephan van Staden

Radu Grigore

unread,
Sep 22, 2010, 8:29:49 AM9/22/10
to jstar...@googlegroups.com
On Wed, Sep 22, 2010 at 11:31 AM, Matthew Parkinson
<mjpar...@gmail.com> wrote:
> So I haven't done anything.   Can someone explain?

Before my email the repo contained a mix of line endings. If we want
the repo text files to always end in LF, and I assume we do want such
uniformity, then


git config --global core.autocrlf input

makes sure that CRLF on someones filesystem becomes LF in the repo.
Github advices Unix users to do this just to make sure they don't
commit a file with CRLF endings that they downloaded from the net, for
example.

The command


git config --global core.autocrlf true

will do the same as the previous one AND will convert from LF to CRLF
when moving from the repo to the filesystem. Thus, it should be run on
Windows where editors prefer CRLF.

The problem you see is caused by files ending in CRLF that where in
the repository. Git tells you you have changes because it wants your
permission to change the endings in LF in the repo. Just do a commit.

Reply all
Reply to author
Forward
0 new messages