我一直在尝试将记事本设置为Git的默认全局编辑器.
调用记事本现在工作正常.这是我的配置文件的样子:
[user]
name = Gavin Hope
email = gavin.hope@myemailaddress.com
[core]
autocrlf = true
excludesfile = C:\\Users\\Gavin.Hope\\Documents\\gitignore_global.txt
editor = 'C:\\Windows\\notepad.exe'
[diff]
tool = p4merge
[merge]
tool = p4merge
[mergetool "p4merge"]
path = C:/Program Files/Perforce/p4merge.exe
keepBackup = false
trustExitCode = false
Run Code Online (Sandbox Code Playgroud)
但是,当记事本启动时,例如git commit,没有换行符.我看到了这个:
# Please enter the commit message for your changes. Lines starting# with '#' will be ignored, and an empty message aborts the commit.## Date: Wed Oct 28 11:40:40 2015 +0000## On branch playtime# Changes to be committed:# modified: file.xyz#
Run Code Online (Sandbox Code Playgroud)
而不是(像这样):
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# Date: Wed Oct 28 11:40:40 2015 +0000
#
# On branch playtime
# Changes to be committed:
# modified: file.xyz#
Run Code Online (Sandbox Code Playgroud)
注意1:这只是配置编辑器中换行符的问题,其他所有操作都可以autocrlf.
注意2:在之前尝试配置编辑器(没有完全工作)的情况下,编辑器中的换行符是正常的.
我错过了参数或参数editor吗?我的配置有什么问题吗?
| 归档时间: |
|
| 查看次数: |
585 次 |
| 最近记录: |