V
V
Vova2017-06-27 12:48:07
git
Vova, 2017-06-27 12:48:07

How to fix git config?

Hello.
I have some misunderstanding of git configs.
More precisely, git config local.
Background:
There is a turnip, it contains text files. With random crlf. The files come from different places, I can't change them. Moreover, their validity (hashes) is checked. In general, you should not change crlf in them.
At first, I just did a git clone, the files got to my disk and got a little spoiled (as I understand it, git brought the crlf to the traditional Windows look in them).
I began to do it and only then it seemed to be good. But changing the global settings is bad. And it is not possible to make it on a non-existent local folder (I haven’t done git clone yet!) What am I doing wrong?
git config --global core.autocrlf false
git clone ...
git config --local ...
How to put crlf in the right state?
(I suspect that you can throw this part of the config into the turnip itself, but I'm afraid to break other people's files that live in the same place, in neighboring folders).
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Moseychuk, 2017-06-27
@JustMoose

Create an empty directory. In it:

git init
# modify config
git remote add remote_name remote_url
git fetch remote_name
git checkout branch_name

Option 2:
git clone --config core.autocrlf=false remote_url

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question