How to make default git error message use CRLF line endings

The default git commit message contains the following:

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch testNotepad
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   new file:   foo.txt

I have notepad as my default editor in git. This message is displayed as a single line due to the end of lines being not CRLF. I would like to change that. How can I do that?

+4
source share
2 answers

git does not support this directly. You will need to use an editor that can handle Unix ( \n) -style line endings .

, , , Windows (\r\n), , Unix- (\n) git.

GitPad - - , .

+2

core.autocrlf true?

- :

git config --global core.autocrlf true
-2

All Articles