Is there a way to reuse the previous comment on a git commit?

前端 未结 4 505
滥情空心
滥情空心 2020-12-30 02:34

Occasionally I will drop into troubleshooting mode and commit/push a number of small but separate commits with a comment like, \"Troubleshooting the during

4条回答
  •  伪装坚强ぢ
    2020-12-30 02:54

    .git/COMMIT_EDITMSG contains the last commit message. https://git-scm.com/docs/git-commit#_files

    git commit --file .git/COMMIT_EDITMSG
    

    will use that file as the commit message.

提交回复
热议问题