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?
git does not support this directly. You will need to use an editor that can handle Unix ( \n) -style line endings .
\n
, , , Windows (\r\n), , Unix- (\n) git.
\r\n
GitPad - - , .
core.autocrlf true?
core.autocrlf
true
- :
git config --global core.autocrlf true