Показаны сообщения с ярлыком GIT. Показать все сообщения
Показаны сообщения с ярлыком GIT. Показать все сообщения

пятница, 11 декабря 2015 г.

GIT error: LF would be replaced by CRLF

Проект loopback.js развернут на Windows.

Конец строки (EOL) во всех файлах Unix-style.
Как вариант исправления ошибки GIT:

$ git config --global core.autocrlf input
Подробнее 

                 | Resulting conversion when       | Resulting conversion when 
                 | committing files with various   | checking out FROM repo - 
                 | EOLs INTO repo and              | with mixed files in it and
                 |  core.autocrlf value:           | core.autocrlf value:           
--------------------------------------------------------------------------------
File             | true       | input      | false | true       | input | false
--------------------------------------------------------------------------------
Windows-CRLF     | CRLF -> LF | CRLF -> LF | as-is | as-is      | as-is | as-is
Unix -LF         | as-is      | as-is      | as-is | LF -> CRLF | as-is | as-is
Mac  -CR         | as-is      | as-is      | as-is | as-is      | as-is | as-is
Mixed-CRLF+LF    | as-is      | as-is      | as-is | as-is      | as-is | as-is
Mixed-CRLF+LF+CR | as-is      | as-is      | as-is | as-is      | as-is | as-is


Visual Studio Code cannot detect installed git

The user settings file is located here:

Windows %APPDATA%\Code\User\settings.json
Mac $HOME/Library/Application Support/Code/User/settings.json
Linux $HOME/.config/Code/User/settings.json

Just add the path to the git executable in your Visual Studio Code settings like this:

{
    "git.enabled": true,
    // Path to the git executable
    "git.path": "C:\path\to\git.exe"
}