Is there any way to incrementally build commit messages in git?

前端 未结 3 1009
情书的邮戳
情书的邮戳 2021-02-13 02:35

I\'m wondering if it is possible to build git commit messages incrementally, documenting what I\'m doing as I make code changes:

  1. Check out and begin work
3条回答
  •  半阙折子戏
    2021-02-13 03:40

    You are supposed to do a commit for every small change you do that requires a message. This is especially easy with a distributed versioning system like git that you are using.

    1. Check out and begin work
    2. Make a code change
    3. Enter commit message and commit
    4. Repeat 2 and 3
    5. Push updates

    And if you for some reason dislike this pattern and want to do the way you described, just use notepad and append to your message after coding a while and then copy paste it when commiting.

提交回复
热议问题