How to amend a commit without changing commit message (reusing the previous one)?

前端 未结 6 1687
醉梦人生
醉梦人生 2020-11-27 08:52

Is there a way to amend a commit without vi (or your $EDITOR) popping up with the option to modify your commit message, but simply reusing the prev

6条回答
  •  遥遥无期
    2020-11-27 09:24

    To extend on the accepted answer, you can also do:

    git commit --amend --no-edit -a
    

    to add the currently changed files.

提交回复
热议问题