S
S
Sergey Shilov2016-07-31 14:45:37
git
Sergey Shilov, 2016-07-31 14:45:37

Why is the git add command not running. ?

I encountered this for the first time, another project was normally uploaded to the repository.
Here is the procedure:
I go to the local folder of the project I
cd ~/project
initialize the git
git init
I follow the files
git add .
And then he writes to me:

warning: LF will be replaced by CRLF in *file_name*
The file will have its original line endings in your working directory.

Then I make a commit and it says:
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:

New to git. Googled, no solution came up.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
Bohdan Shtepan, 2016-07-31
@virtyaluk

Initialize a new repository
Add files (all)
If files are not added, then add each manually
Make a commit
Push

warning: LF will be replaced by CRLF in *file_name*
The file will have its original line endings in your working directory.

It just says that a line feed will be followed by a carriage return.

F
FoxInSox, 2016-07-31
@FoxInSox

The first line of Google for the request "warning: LF will be replaced by CRLF in *file_name*"
stackoverflow.com/questions/5834014/lf-will-be-rep...
What didn't suit you here?

F
franticstas, 2018-06-13
@franticstas

This is due to the fact that the line breaks were in Unix format, as it happened under Windows.
Simple solutions:
It's very easy to convert line breaks to Windows format using Notepad++ text editor: Edit→EOL conversion→Convert to WIN format.
More.
Manually convert line break characters from Windows to Linux, open the file, once again visually check everything and save.
You can quickly replace CRLF with LF using the dos2unix utility included with MINGW, which comes with git for win32:
dos2unix.exe -f -D *file*

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question