Add a hash/pound symbol as the first character in a git commit message in vim

前端 未结 2 1442
梦毁少年i
梦毁少年i 2020-12-21 05:35

GitHub (probably, wrongly) uses #\'s when referring to GitHub issues. So I would like to add a commit message that refers to the issue on the first line.

<
2条回答
  •  一整个雨季
    2020-12-21 06:16

    Git allows you to update the comment char from the # symbol to any other. Then you can use the # symbol.

    e.g.

    git config core.commentChar '>'
    

    or optionally set it globally

    git config --global core.commentchar '>'
    

提交回复
热议问题