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

后端 未结 6 812
面向向阳花
面向向阳花 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:16

    You can also type:

    git commit -am "Nailed it
    !
    "
    

    So just hit enter and place the exclamation mark on a new line, then close off the commit message. Found that one out by accident one day.

提交回复
热议问题