How to commit no change and new message?

后端 未结 5 1703
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-02 11:01

How can I make a new commit and create a new message if no changes are made to files?

Is this not possible since the commit\'s code (SHA ?) will be the

5条回答
  •  心在旅途
    2020-12-02 11:33

    Empty commit with a message

    git commit --allow-empty -m "Empty test commit"
    

    Empty commit with an empty message

    git commit --allow-empty --allow-empty-message
    

提交回复
热议问题