I
I
IvanS19892021-01-31 00:48:16
git
IvanS1989, 2021-01-31 00:48:16

What's the warning when adding readme.md to the git index?

When changing the contents of the readme.md file and adding it to the index for further commit, a warning appears - The file will have its original line endings in your working directory. Does this mean that its contents will not change if we roll back to the previous commit? Because when I roll back with reset to the previous commit, the contents of the file remain changed and which we committed.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Vasilyev, 2021-01-31
@IvanS1989

Turn off automatic conversion like this:
git config --global core.autocrlf false
Just turn off the warning:
git config --global core.safecrlf false
And globally the problem is line breaks in Win and Linux
https://git-scm.com/book/ en/v2/Customizing-Git-Git...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question