spl*_*ter 0 git version-control commit notepad++ git-commit
我git在 Windows 上使用,当我使用commit command in the command prompt, my Notepad++ opens up and asks me to put in a commit message as follows:
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Your branch is up-to-date with 'origin/master'.
Run Code Online (Sandbox Code Playgroud)
This is great, but I want to be able to separate the message title from its body. When I write my commit message above the #'s, it is sent as if I used the commit -m command, that is, it contains only a title.
Can someone suggest the proper way to be able to separate the title from the body in a commit message using Notepad++?
编辑:这个问题与关于在提交消息中将正文与标题分离的其他问题不同,因为其他问题询问如何从命令行执行此操作,而我问如何使用 Notepad++ 执行此操作。
主题和正文由主题后面的第一个空行分隔。因此,您有多种选择来编写具有主题和正文的消息。
git commit -m 'foo
bar'
Run Code Online (Sandbox Code Playgroud)
或者
git commit -m 'foo' -m 'bar'
Run Code Online (Sandbox Code Playgroud)
或者在编辑器中,
foo
bar
#comment...
#comment...
#comment...
Run Code Online (Sandbox Code Playgroud)