Use of an exclamation mark in a Git commit message via the command line

后端 未结 6 810
面向向阳花
面向向阳花 2020-12-07 12:52

How do I enter an exclamation point into a Git commit message from the command line?

It is possible to escape the exclamation point with a backslash, but then the ba

6条回答
  •  我在风中等你
    2020-12-07 13:34

    No need to remember what quotes or escapes to use, instead

    1. Type your command (or part of it)
    2. In your command line, press Ctr X E » will open your "external editor".
    3. Edit your command, and close your editor.

    … the command will be executed & any special characters will show up correctly in the Git commit message!

    (NB many other uses: typing complex commands, adding line breaks in your commit message etc.)

提交回复
热议问题